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
30 31 32 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 30 def clear_reflections_cache @__reflections = nil end |
#dangerous_attribute_method?(_name) ⇒ Boolean
override
21 22 23 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 21 def dangerous_attribute_method?(_name) false end |
#default_scopes ⇒ Object
34 35 36 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 34 def default_scopes [] end |
#generated_association_methods ⇒ Object Also known as: generated_feature_methods
10 11 12 13 14 15 16 |
# 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
26 27 28 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 26 def pluralize_table_names to_s.pluralize end |