Module: ActiveModel::Associations::OverrideMethods::ClassMethods
- Defined in:
- lib/active_model/associations/override_methods.rb
Instance Method Summary collapse
- #clear_reflections_cache ⇒ Object
-
#dangerous_attribute_method?(name) ⇒ Boolean
override.
- #default_scopes ⇒ Object
- #generated_association_methods ⇒ Object (also: #generated_feature_methods)
-
#pluralize_table_names ⇒ Object
dummy table name.
Instance Method Details
#clear_reflections_cache ⇒ Object
26 27 28 |
# File 'lib/active_model/associations/override_methods.rb', line 26 def clear_reflections_cache @__reflections = nil end |
#dangerous_attribute_method?(name) ⇒ Boolean
override
17 18 19 |
# File 'lib/active_model/associations/override_methods.rb', line 17 def dangerous_attribute_method?(name) false end |
#default_scopes ⇒ Object
30 31 32 |
# File 'lib/active_model/associations/override_methods.rb', line 30 def default_scopes [] end |
#generated_association_methods ⇒ Object Also known as: generated_feature_methods
6 7 8 9 10 11 12 |
# File 'lib/active_model/associations/override_methods.rb', line 6 def generated_association_methods @generated_association_methods ||= begin mod = const_set(:GeneratedAssociationMethods, Module.new) include mod mod end end |
#pluralize_table_names ⇒ Object
dummy table name
22 23 24 |
# File 'lib/active_model/associations/override_methods.rb', line 22 def pluralize_table_names self.to_s.pluralize end |