This is the expected behavior. It is very difficult to detect changes in a serialized attribute, so they are updated with every save.
Consider the following (ruby 1.8.7) irb session:
ruby-1.8.7-p352 :001 > x = "--- \n:b: 2\n:a: 1\n" => "--- \n:b: 2\n:a: 1\n" ruby-1.8.7-p352 :002 > y = "--- \n:a: 1\n:b: 2\n" => "--- \n:a: 1\n:b: 2\n" ruby-1.8.7-p352 :003 > x == y => false ruby-1.8.7-p352 :004 > YAML.load(x) == YAML.load(y) => true
source share