Module: EacRailsUtils::Models::TablelessAssociations::OverrideMethods::ClassMethods
- Defined in:
- lib/eac_rails_utils/models/tableless_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
31 32 33 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 31 def clear_reflections_cache @__reflections = nil end |
#dangerous_attribute_method?(_name) ⇒ Boolean
override
22 23 24 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 22 def dangerous_attribute_method?(_name) false end |
#default_scopes ⇒ Object
35 36 37 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 35 def default_scopes [] end |
#generated_association_methods ⇒ Object Also known as: generated_feature_methods
10 11 12 13 14 15 16 17 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 10 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
27 28 29 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 27 def pluralize_table_names to_s.pluralize end |