Is there any documentation, or advice?
You can use Active Model
Take a look here.
Look at the source code at Github.
Using ActiveAttr is the more modern way of doing this.
Gem: https://github.com/cgriego/active_attr Railscast: http://railscasts.com/episodes/326-activeattr