Written by Sean Behan on Sun Jun 17th 2012

Alias an attribute with alias_attribute method.

The first argument is the name for the new attribute, while the second argument is to identify the attribute that is already defined.

class User < ActiveRecord::Base
  alias_attribute :username, :login

Tagged with..
#activerecord #aliasing #quick tips #Ruby on Rails

Just finishing up brewing up some fresh ground comments...