VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app

Aliasing Attributes in Ruby on Rails

       

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
end
Tagged w/ #activerecord #aliasing #quick tipsruby on rails