Just put it in the ~/.irbrc file. It gets loaded every time you run irb or rails console. The Rails console is just irb with your Rails application environment loaded.
Find more infos about irb here: http://ruby-doc.com/docs/ProgrammingRuby/html/irb.html#S2