[Rails] redirect_to(session[:return_to]) vs session.delete

2013-01-18 Thread Alex M
Hey all, Recently I've been looking into on how to return back to a previous referring URL and and the most common approach is: redirect_to session[:return_to] But some recommend: redirect_to(session.delete(:return_to) || default) How I understand it, in the second example we call

[Rails] sudo gem install rails not working because of problem with alias_method and is_file

2013-01-12 Thread Alex M.
I had downloaded ruby, rails, and rubygems previously on my hard drive when I ran Windows. I just downloaded Ubuntu and tried to use RoR but it wasn't working, so I figured I had to follow the installation procedure listed here http://guides.rubyonrails.org/getting_started.html to get it working.