Module: ActiveSecurity::FinderMethods
- Defined in:
- lib/active_security/finder_methods.rb
Instance Method Summary collapse
-
#find(*args) ⇒ Object
Finds a record using the given id.
Instance Method Details
#find(*args) ⇒ Object
Finds a record using the given id. Because this is injected into the Model as well as the relation, we need handling for both.
6 7 8 9 10 11 12 13 14 |
# File 'lib/active_security/finder_methods.rb', line 6 def find(*args) if is_a?(ActiveRecord::Relation) _active_security_enforce_if_not_scoped else _active_security_not_scoped_handler end super end |