hii all, i don''t know how to ask this question because am new to rails. but i want to know to is which part of code sumit_tag will take you means after execution of sumit_tag where control of programme goes?? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amit Tomar wrote:> hii all, > i don''t know how to ask this question because am new to > rails. > but i want to know to is which part of code sumit_tag will take you > means > after execution of sumit_tag where control of programme goes??-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amit Tomar wrote:> hii all, > i don''t know how to ask this question because am new to > rails. > but i want to know to is which part of code sumit_tag will take you > means > after execution of sumit_tag where control of programme goes??Do you understand how HTML forms work in general? If so, the answer should be obvious (hint: the submit_tag has nothing to do with it); also look at form_for and form_tag. If you don''t understand how HTML forms work in general, then you''re not ready to be developing Web applications yet. Read through a good HTML reference, then come back. Good luck! Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 27 August 2010 15:32, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Amit Tomar wrote: >> hii all, >> i don''t know how to ask this question because am new to >> rails. >> but i want to know to is which part of code sumit_tag will take you >> means >> after execution of sumit_tag where control of programme goes?? > > Do you understand how HTML forms work in general? If so, the answer > should be obvious (hint: the submit_tag has nothing to do with it); also > look at form_for and form_tag. > > If you don''t understand how HTML forms work in general, then you''re not > ready to be developing Web applications yet. Read through a good HTML > reference, then come back. Good luck!Whilst I agree with Marnen, if you are using Rails as a way of learning about the whole concept of web applications and am therefore learning about html, css, javascript, SQL and Rails at the same time, then whilst working through an html reference and tutorials have a look at the Rails Guides at http://guides.rubyonrails.org/. Start with Getting Started obviously. Playing with Rails at the same time as learning the more tedious (but necessary) details of html will make your life more enjoyable. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
On 27 August 2010 14:52, Amit Tomar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Amit Tomar wrote: >> hii all, >> i don''t know how to ask this question because am new to >> rails. >> but i want to know to is which part of code sumit_tag will take you >> means >> after execution of sumit_tag where control of programme goes??A submit_tag goes inside a form, for example: <%= form_tag :controller => ''votes'', :action => ''create'' do %> <%= submit_tag %> <% end %> This generates HTML like: <form action="/votes/create" method="post"> <input type="submit" value="Submit"> </form> So when you press that submit button, your browser POSTs to the ''/votes/create'' URL. When Rails receives that request, it turns the URL into a controller and an action, based on the rules in your config/routes.rb. In this case it goes to the action/method called ''create'' in VotesController. Chris -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.