1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove unused internal methods in ActiveModel::Attributes

This commit is contained in:
Ryuta Kamizono 2020-10-27 15:50:55 +09:00
parent b439b78705
commit 13bd289b44

View file

@ -120,25 +120,11 @@ module ActiveModel
end
private
def write_attribute(attr_name, value)
name = attr_name.to_s
name = self.class.attribute_aliases[name] || name
@attributes.write_from_user(name, value)
end
def _write_attribute(attr_name, value)
@attributes.write_from_user(attr_name, value)
end
alias :attribute= :_write_attribute
def read_attribute(attr_name)
name = attr_name.to_s
name = self.class.attribute_aliases[name] || name
@attributes.fetch_value(name)
end
def attribute(attr_name)
@attributes.fetch_value(attr_name)
end