модуль ActiveRecord::AttributeMethods::Write
Константы
- WriterMethodCache
Публичные методы экземпляров
# File activerecord/lib/active_record/attribute_methods/write.rb, line 59 def raw_write_attribute(attr_name, value) write_attribute_with_type_cast(attr_name, value, false) end
# File activerecord/lib/active_record/attribute_methods/write.rb, line 55 def write_attribute(attr_name, value) write_attribute_with_type_cast(attr_name, value, true) end
Обновляет атрибут, определенный attr_name, указанным value. Пустые строки для столбцов типа Целое число и Число с плавающей точкой преобразуются в nil.
© 2004–2018 David Heinemeier Hansson
Licensed under the MIT License.