This is a basic and common problem, and I want to clear it once and for all. (Tried days)
I have two forms, which are on the homepage (whos controller is The following code is for the signup page: ` When the page presents, there will be an action in the HTML form. Depending on whether you are signing up or signing in, you can use Javascript to change the action for the form. static_pages_controller ). One form is to sign in, to sign the other. Uses
create verb using
sign_in form
sessions_controller . Uses
users_controller using
users_controller while using
form_tag . How you can specify the controller should go to it and what action should it take?
& lt;% = form_tag (users_path)%> ; & Lt;% = label_tag: name% & gt; & Lt;% = text_field_tag: name% & gt; & Lt;% = label_tag: email% & gt; & Lt;% = text_field_tag: Email% & gt; & Lt;% = label_tag: Password% & gt; & Lt;% = password_field_tag: Password% & gt; & Lt;% = label_tag: password_confirmation, "confirmation"%> & Lt;% = password_field_tag: password_confirmation% & gt; & Lt;% = submit_tag "Create Your Account", Category: "BTN BTN-Big BTN-Primary"%> & Lt;% end% & gt; I know that there are options like
form_tag ({: controller = & gt; "user",: action = & gt; "create"}: method = & Gt; "post" ,: class = & gt; "nifty_product") but none works for Sign_in also please help!
Comments
Post a Comment