i use the restful_authentication plugin,i found one line in new.html.erb file as following: <% form_for session_path do -%> the session_path is a variable? i can not find anything definition about it. thanks a lot! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> > <% form_for session_path do -%> > > the session_path is a variable?It could be a helper, check it to helper area or get it to your plugin -> vendor folder. ~~~~~~~~~~~~~~~~~~~~~~~~ Reinhart Ariando http://teapoci.blogspot.com MSN: reinhart.showbiz-EMRzualFZlQ@public.gmane.org YM : Booking2Heaven ~~~~~~~~~~~~~~~~~~~~~~~~ -- 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 -~----------~----~----~----~------~----~------~--~---
i have checked that helper,no such definition ,and i searched all source in my project.nothing about the session_path. any idea? On 3月13日, 下午2时21分, Visit Indonesia 2008 <rails-mailing-l...@andreas- s.net> wrote:> > <% form_for session_path do -%> > > > the session_path is a variable? > > It could be a helper, check it to helper area or get it to your plugin > -> vendor folder. > > ~~~~~~~~~~~~~~~~~~~~~~~~ > Reinhart Ariando > > http://teapoci.blogspot.com > MSN: reinhart.show...-EMRzualFZlQ@public.gmane.org > YM : Booking2Heaven > ~~~~~~~~~~~~~~~~~~~~~~~~ > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
haha ...let''s try this again! I think I hit the wrong "reply" button the first time. On Mar 12, 10:56 pm, "Vincent.Z" <zhu1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i use the restful_authentication plugin,i found one line in > new.html.erb file as following: > > <% form_for session_path do -%> > > the session_path is a variable? > i can not find anything definition about it. > > thanks a lot!I just set this up.... session_path is a view helper mapping a route to the create action. Rails provides this dynamically (right?) because session is a singleton Resource. In your routes.rb file there is/should be: map.resource :session This gives you named routes(RESTful) and view helpers. ....is that cool or what! for more info and examples, see api: http://api.rubyonrails.org/classes/ActionController/Resources.html all this was created when you ran the generator in restful_authentication. You provided the word "session" ...some use "account". ..I''m forgetting which one is default...I thought the readme was very good. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi I''m having a similar problem with this. I''ve developed an application with restful_authentication and it''s running fine locally under mongrel but when I deploy it to my host running fast-cgi the routes act differently. so the line <% form_for session_path do -%> should direct to the create action in the sessions controller (as it does locally) but instead it calls the show action. In my routes.rb I have: map.resource :session, :controller => ''sessions'' which should create the default routes to actions create and show (plus others) the difference being show is GET and create is POST. I''ve tried specifying the form_for is POST with :method => "POST" but it still directs to show (via GET). Thanks in advance. Mark On Mar 14, 12:17 am, Doug <dou...-yBeKhBN/0LDR7s880joybQ@public.gmane.org> wrote:> haha ...let''s try this again! > I think I hit the wrong "reply" button the first time. > > On Mar 12, 10:56 pm, "Vincent.Z" <zhu1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > i use the restful_authentication plugin,i found one line in > > new.html.erb file as following: > > > <% form_for session_path do -%> > > > the session_path is a variable? > > i can not find anything definition about it. > > > thanks a lot! > > I just set this up.... > > session_path is a view helper mapping a route to the create action. > Rails provides this dynamically (right?) because session is a > singleton Resource. > > In your routes.rb file there is/should be: > map.resource :session > > This gives you named routes(RESTful) and view helpers. > ....is that cool or what! > > for more info and examples, see api:http://api.rubyonrails.org/classes/ActionController/Resources.html > > all this was created when you ran the generator in > restful_authentication. > You provided the word "session" ...some use "account". > ..I''m forgetting which one is default...I thought the readme was very > good.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---