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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This code might not work. These are just symbols, but Rails has always insisted on strings for controller and action names. On Jul 22, 2007, at 3:47 PM, Bahadır Doğan wrote:> > 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? > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
:index and :whatever are called symbols. The Pickaxe book discusses there in depth. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---