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

Instance Method Details

#association(name) ⇒ Object

use by association accessor



74
75
76
77
78
79
80
81
82
83
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 74

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

Returns:

  • (Boolean)


91
92
93
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 91

def new_record?
  false
end

#read_attribute(name) ⇒ Object Also known as: _read_attribute



85
86
87
# File 'lib/eac_rails_utils/models/tableless_associations/override_methods.rb', line 85

def read_attribute(name)
  send(name)
end