You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thoughts on adding something like this (possibly naming it attributes=)?
# Analagous to ActiveRecord's #attributes= -- allows for writing attributes via a hash
def write_attributes(attrs)
attrs.each do |attr, val|
write_attribute(attr, val)
end
end
The text was updated successfully, but these errors were encountered:
Yes, it's a good idea to follow the Rails naming conventions and PR is welcomed.
But unfortunately there is already attributes accessor (defined here). It's too low-level and doesn't cast attribute values. So it makes sense to change it with proposed implementation. But it would be a breaking change so I believe we should wait until the next major release.
There is similar method #load (here) which is used completely internally but accidentally public. It could be used for now and later in the next major release it will become private.
Thoughts on adding something like this (possibly naming it
attributes=
)?The text was updated successfully, but these errors were encountered: