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
39 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 39 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 |
# 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
42 43 44 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 42 def dangerous_attribute_method?(*_args) false end |
#default_scopes ⇒ Object
59 60 61 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 59 def default_scopes [] end |
#generated_association_methods ⇒ Object
needed for Rails 4.1 + act_as_taggable
47 48 49 50 51 52 53 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 47 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
35 36 37 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 35 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
55 56 57 |
# File 'app/models/concerns/spotlight/ar_light.rb', line 55 def validators_on(*_) [] end |