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



132
133
134
135
136
137
138
139
140
# File 'lib/dolzenko/django_f_object.rb', line 132

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