Hi In my form i m using link_to helper to pass the user_id and user_type.like below i used <%= link_to(''assign'',{ :action => :privilege_assign,:id => user.id, :type => "1" } ) -%> it passes like below http://192.168.0.82:3000/users/privileg … n/2?type=1 when i click assign link it passes user_id and user_type correctly. in that assign.rhtml i have field like <% form_for :profile, @profile, :url => { :action => ''privilege_assign'' } do |f| %> <label>Profile : </label> <%= text_field_with_auto_complete :profile, :name, { :size => 24} %> </div> <%=flash[:notice]%> <%= submit_tag '''', :class => ''SubmitButton'' %> when the user enters submit button without entering any value into the field the flash notice message will be displayed.then if he enters value into the field and he click the submit button it passes only user_id .it doesnot passing the user_type. it passes like below http://192.168.0.82:3000/users/privilege_assign/2 why it happens pls help me -- 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 -~----------~----~----~----~------~----~------~--~---
On 17 Jan 2009, at 08:35, Newb Newb wrote:> > <% form_for :profile, > @profile, > :url => { :action => ''privilege_assign'' } do |f| %> > <label>Profile : </label> > <%= text_field_with_auto_complete :profile, :name, { :size => 24} %> > </div> > <%=flash[:notice]%> > > > <%= submit_tag '''', :class => ''SubmitButton'' %> > > > when the user enters submit button without entering any value into the > field > the flash notice message will be displayed.then if he enters value > into > the field and he click the submit button it passes only user_id .it > doesnot passing the user_type. > it passes like below > http://192.168.0.82:3000/users/privilege_assign/2 > >That''s normal. Forms post their contents by default and so those parameters don''t show up in the url. Fred> why it happens pls help me > -- > 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 17 Jan 2009, at 08:35, Newb Newb wrote: >> <%= submit_tag '''', :class => ''SubmitButton'' %> >> >> > That''s normal. Forms post their contents by default and so those > parameters don''t show up in the url. > > Fredcould u say me the alternative regards newb -- 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 -~----------~----~----~----~------~----~------~--~---