I have two controllers (article, user) and associated views. I want to render partial of the login form in the sidebar of the article view by doing something like this. <%= render(:partial => ''login'') %> and the _login.rthml has something as follow: <%= start_form_tag %> <label for="user_name">Name: </label> <%= text_field_tag :name, params[:name] %> <label for="user_password">Password: </label> <%= password_field_tag :password, params[:password] %> <%= submit_tag ''Login''%> <%= end_form_tag %> however, I cannot figure out how to submit userid and password info getting from the form to the "login" function in the user controller. Could you please explain how to do this? And if possible, I would like to make this login system looks like digg''s one using AJAX. Is there any tutorial for this? -- 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 -~----------~----~----~----~------~----~------~--~---
<%= start_form_tag (:controller => ''user'', :action => ''login'' %> should work. See http://rubyonrails.org/api/classes/ActionView/Helpers/FormTagHelper.html#M000491 Vish On 9/26/06, Jay L. <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I have two controllers (article, user) and associated views. > I want to render partial of the login form in the sidebar of the article > view by doing something like this. > > <%= render(:partial => ''login'') %> > > and the _login.rthml has something as follow: > > <%= start_form_tag %> > <label for="user_name">Name: </label> > <%= text_field_tag :name, params[:name] %> > <label for="user_password">Password: </label> > <%= password_field_tag :password, params[:password] %> > <%= submit_tag ''Login''%> > <%= end_form_tag %> > > however, I cannot figure out how to submit userid and password info > getting from the form to the "login" function in the user controller. > Could you please explain how to do this? > And if possible, I would like to make this login system looks like > digg''s one using AJAX. > Is there any tutorial for this? > > -- > 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 -~----------~----~----~----~------~----~------~--~---
hi, can someone explain partials? a partial is a line of code in a view that can pass information to a partial file (*the file that starts with an underscore with the same name as the view) and can use whats in the partial file to replace the line of code thats in the view? -- 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 -~----------~----~----~----~------~----~------~--~---
Vishnu Gopal wrote:> <%= start_form_tag (:controller => ''user'', :action => ''login'' %> > > should work. > > See > http://rubyonrails.org/api/classes/ActionView/Helpers/FormTagHelper.html#M000491 > > VishThanks! it works :D -- 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 -~----------~----~----~----~------~----~------~--~---