Module: EacRailsUtils::Models::TablelessAssociations::OverrideMethods
- Extended by:
- ActiveSupport::Concern
- Included in:
- EacRailsUtils::Models::TablelessAssociations
- Defined in:
- lib/eac_rails_utils/models/tableless_associations/override_methods.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#association(name) ⇒ Object
use by association accessor.
-
#new_record? ⇒ Boolean
dummy.
- #read_attribute(name) ⇒ Object (also: #_read_attribute)
Instance Method Details
#association(name) ⇒ Object
use by association accessor
72 73 74 75 76 77 78 79 80 81 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 72 def association(name) # :nodoc: association = association_instance_get(name) if association.nil? association = association_by_reflection(name) association_instance_set(name, association) end association end |
#new_record? ⇒ Boolean
dummy
89 90 91 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 89 def new_record? false end |
#read_attribute(name) ⇒ Object Also known as: _read_attribute
83 84 85 |
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 83 def read_attribute(name) send(name) end |