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
- #columns_hash ⇒ 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.
- #has_attribute?(*_args) ⇒ Boolean
- #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
24 25 26 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 24 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 |
#columns_hash ⇒ Object
20 21 22 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 20 def columns_hash {} 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 |
#has_attribute?(*_args) ⇒ Boolean
16 17 18 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 16 def has_attribute?(*_args) false 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
29 30 31 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 29 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 |