Module: ActiveRecord::AttributeMethods::Write

Defined in:
lib/dolzenko/django_f_object.rb

Instance Method Summary collapse

Instance Method Details

#write_attribute_with_f_object(attr_name, value) ⇒ Object



129
130
131
132
133
134
135
136
137
# File 'lib/dolzenko/django_f_object.rb', line 129

def write_attribute_with_f_object(attr_name, value)
  write_attribute_without_f_object(attr_name, value)

  # cancel number and any other type of conversions
  if value.is_a?(F)
    value.klass = self.class
    @attributes[attr_name] = value
  end
end