Hello, I've looking at a tutorial in a web page and i saw a sample: def logout session[:user] = nil redirect_to :controller => :user, :action => :index end def register if request.post? @user = User.new(params[:user]) if @user.save redirect_to :action => :account_creation_success, :id => @user end end end i want to learn the names of these to search and learn about them? ":index" and ":account_creation_success" what are they called?
on 2007-07-23 00:47
on 2007-07-23 09:20
:index and :whatever are called symbols. The Pickaxe book discusses there in depth.
on 2007-07-26 00:46
This code might not work. These are just symbols, but Rails has always insisted on strings for controller and action names.