remiprev/her — pull request #301 by pisaruk (2014-11-17 16:30:50+00:00)
Title: Handle has one and accepts nil value for it

Now has_one associations will be taken into account when calling to_params in the parent model.
That allow us to save a parent model containing has_one associations.
For example:

class Person
include Her::Model
has_one :nick_name
attributes :name
end

class NickName
include Her::Model
attributes :origin, :author, :created_at
end

p = Person.first
p.assign_attributes(name: 'José',
nick_name_attributes: {origin: 'high_school', author: 'Big Guy', created_at: 18.years.ago})
p.save

Besides that nil value will be accepted:

p = Person.first
p.nick_name = nil
p.save