Fix to use `write_attribute`

In rails 4.0.0.beta1, ActiveRecord uses `@attributes`
to keep its attributes (instead of instance variable named as attribute
name).
Even if instance variable is assigned, attributes is not updated against my
expectation.

So I use `write_attribute` to update model's attributes.
rails 4 support
Merge remote-tracking branch 'tricknotes/write_attribute' into rails4
update travis config
Merge branch 'rails4'