# create and use the new RVM gemset
$ rvm use --create 1.9.3@awesome_rails_project
# install rails into the blank gemset
$ gem install rails
# generate the new rails project
$ rails new awesome_rails_project
# go into the new project directory and create an .rvmrc for the gemset
$ cd awesome_rails_project
$ rvm --rvmrc 1.9.3@awesome_rails_project
# verify the rvmrc
$ cd ..; cd -
def login
if request.post?
begin
session[:user] = User.authenticate(params[:employee][:email], params[:employee][:password]).id
redirect_to :controller => 'tickets', :action => 'list_open'
rescue AuthenticationError => e
flash[:warning] = "#{e}"
end
end
end
def add
book = Book.find(params[:id]) or raise ActiveRecord::RecordNotFound
# Added by sending book object.
flash[:cart_notice] = "'#{book.title}' was added!" if @cart.add book
redirect_to :action => 'index'
end