Module: ErpTechSvcs::Extensions::ActiveRecord::ScopedBy::InstanceMethods
- Defined in:
- lib/erp_tech_svcs/extensions/active_record/scoped_by.rb
Instance Method Summary collapse
- #add_scope(scope_name, scope_value) ⇒ Object
- #get_scope(scope_name) ⇒ Object
- #remove_scope(scope_name) ⇒ Object
Instance Method Details
#add_scope(scope_name, scope_value) ⇒ Object
45 46 47 48 |
# File 'lib/erp_tech_svcs/extensions/active_record/scoped_by.rb', line 45 def add_scope(scope_name, scope_value) scoped_by[scope_name.to_s] = scope_value save end |
#get_scope(scope_name) ⇒ Object
55 56 57 |
# File 'lib/erp_tech_svcs/extensions/active_record/scoped_by.rb', line 55 def get_scope(scope_name) scoped_by[scope_name.to_s] end |
#remove_scope(scope_name) ⇒ Object
50 51 52 53 |
# File 'lib/erp_tech_svcs/extensions/active_record/scoped_by.rb', line 50 def remove_scope(scope_name) scoped_by[scope_name.to_s] = nil save end |