wice_grid icon indicating copy to clipboard operation
wice_grid copied to clipboard

Rails 4.2.3, Can't skip with default_scope

Open rohitpbhore opened this issue 8 years ago • 3 comments

wice_grid 3.6.0.pre5 & Rails 4.2.3

Example: Into model

class Product < ActiveRecord::Base
  default_scope { where(archived: false) }
end

Into controller action

@products = initialize_grid(
  Product.unscoped
)

Still it adds where condition of default scope

rohitpbhore avatar Sep 29 '17 07:09 rohitpbhore

@leikind could you please help us resolving this issue?

vedsingh-fullstack avatar Oct 03 '17 10:10 vedsingh-fullstack

Sorry, I am not supporting this gem anymore.

leikind avatar Oct 03 '17 10:10 leikind

This is a weird bug. There is a setting USE_DEFAULT_SCOPE inside the configuration-file, but if set, it will actually just use the relation as given (imho). While the default case will always force the unscoped case.

nathanvda avatar Nov 14 '17 13:11 nathanvda