solnic/virtus — pull request #269 by fnando (2014-05-19 01:13:12+00:00)
Title: Set InstanceMethods#to_h as an alias.

ActiveRecord serializers require the to_h method. Without this PR, one must create a serializer like the following:

```ruby
class UserPreferences
include Virtus.model

attribute :github, String
attribute :twitter, String
attribute :newsletter, Boolean

alias_method :to_h, :to_hash

def self.dump(preferences)
preferences.to_h
end

def self.load(preferences)
new(preferences)
end
end
```

The to_h method used to work on the `include Virtus` era, but not anymore.