Module: Spotlight::ArLight::ClassMethods
- Defined in:
- app/models/concerns/spotlight/ar_light.rb
Overview
Mock activerecord class-level methods
Instance Method Summary collapse
- #add_autosave_association_callbacks(_arg) ⇒ Object
- #base_class ⇒ Object
- #before_destroy(*_args) ⇒ Object
-
#dangerous_attribute_method?(*_args) ⇒ Boolean
needed for Rails 4.1 + act_as_taggable.
- #default_scopes ⇒ Object
-
#generated_association_methods ⇒ Object
needed for Rails 4.1 + act_as_taggable.
- #generated_feature_methods ⇒ Object
- #pluralize_table_names ⇒ Object
-
#subclass_from_attributes?(_) ⇒ Boolean
required for Rails >= 4.0.4.
- #validators_on(*_) ⇒ Object
Instance Method Details
#add_autosave_association_callbacks(_arg) ⇒ Object
40 41 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 40 def add_autosave_association_callbacks(_arg) end |
#base_class ⇒ Object
16 17 18 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 16 def base_class self end |
#before_destroy(*_args) ⇒ Object
33 34 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 33 def before_destroy(*_args) end |
#dangerous_attribute_method?(*_args) ⇒ Boolean
needed for Rails 4.1 + act_as_taggable
44 45 46 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 44 def dangerous_attribute_method?(*_args) false end |
#default_scopes ⇒ Object
61 62 63 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 61 def default_scopes [] end |
#generated_association_methods ⇒ Object
needed for Rails 4.1 + act_as_taggable
49 50 51 52 53 54 55 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 49 def generated_association_methods @generated_association_methods ||= begin mod = const_set(:GeneratedAssociationMethods, Module.new) include mod mod end end |
#generated_feature_methods ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 25 def generated_feature_methods @generated_feature_methods ||= begin mod = const_set(:GeneratedFeatureMethods, Module.new) include mod mod end end |
#pluralize_table_names ⇒ Object
36 37 38 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 36 def pluralize_table_names true end |
#subclass_from_attributes?(_) ⇒ Boolean
required for Rails >= 4.0.4
21 22 23 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 21 def subclass_from_attributes?(_) false end |
#validators_on(*_) ⇒ Object
57 58 59 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 57 def validators_on(*_) [] end |