wice_grid
wice_grid copied to clipboard
Rails 4.2.3, Can't skip with default_scope
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
@leikind could you please help us resolving this issue?
Sorry, I am not supporting this gem anymore.
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.