Module: ScopieRails::Controller
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/scopie_rails/controller.rb
Instance Method Summary collapse
- #apply_scopes(target, scopie: default_scopie, hash: params) ⇒ Object
- #current_scopes(scopie: default_scopie, hash: params) ⇒ Object
- #default_scopie ⇒ Object
Instance Method Details
#apply_scopes(target, scopie: default_scopie, hash: params) ⇒ Object
9 10 11 |
# File 'lib/scopie_rails/controller.rb', line 9 def apply_scopes(target, scopie: default_scopie, hash: params) Scopie.apply_scopes(target, hash, method: hash[:action], scopie: scopie) end |
#current_scopes(scopie: default_scopie, hash: params) ⇒ Object
13 14 15 |
# File 'lib/scopie_rails/controller.rb', line 13 def current_scopes(scopie: default_scopie, hash: params) Scopie.current_scopes(hash, method: hash[:action], scopie: scopie) end |
#default_scopie ⇒ Object
5 6 7 |
# File 'lib/scopie_rails/controller.rb', line 5 def default_scopie @default_scopie ||= find_scopie_class.new(self) end |