Ideally, if the model has a field that matches the passed hash key, or responds to a setter matching that key, then it should delegate via send to the appropriate setter method. Otherwise, it should default to storing within the attributes hash.
Use case:
class User
include Opium::Model
field :password, type: String
attr_accessor :password_confirmation
end
u = User.new( password: "redacted", password_confirmation: "redacted" )
u.attributes.has_key?( :password_confirmation ) # should be false; currently true.
Ideally, if the model has a field that matches the passed hash key, or responds to a setter matching that key, then it should delegate via send to the appropriate setter method. Otherwise, it should default to storing within the attributes hash.
Use case: