Hi why is that not working? Controller----------------------------------------------------- def bla month = params[:month_select] redirect_to :action => "index" flash[:error_messages_for] = month.to_s end View---------------------------------------------------------- <%form_tag :action => "bla" do %> <%= select_month(Date.today, :field_name => ''month_select'') %> <%= submit_tag "Jump" %> <% end %> -------------------------------------------------------------- The notice is empty after the post. Greetings, Andi -- 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 -~----------~----~----~----~------~----~------~--~---
The redirect should be the last statement. On 11/22/08, Andi Geheim <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi > > why is that not working? > > > Controller----------------------------------------------------- > > def bla > > month = params[:month_select] > > redirect_to :action => "index" > flash[:error_messages_for] = month.to_s > > end > > > > View---------------------------------------------------------- > > <%form_tag :action => "bla" do %> > > <%= select_month(Date.today, :field_name => ''month_select'') %> > <%= submit_tag "Jump" %> > > <% end %> > > -------------------------------------------------------------- > > The notice is empty after the post. > > Greetings, Andi > -- > Posted via http://www.ruby-forum.com/. > > > >-- -- James Mitchell --~--~---------~--~----~------------~-------~--~----~ 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 thanks for the answer! this is not the problem. The notice will be shown up on the index. The problem is that the post is empty. If i exchange the select_month with select_date the post work out. for example: I choose the date: 22.11.2008 the result is: month11day22year2008 (i am not sure about the order) Other ideas? -- 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 -~----------~----~----~----~------~----~------~--~---
On Nov 22, 3:30 pm, Andi Geheim <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> hi > > thanks for the answer! > > this is not the problem. The notice will be shown up on the index. > > The problem is that the post is empty. If i exchange the select_month > with select_date the post work out.Check your logs to see under what name the parameter arrives (or look at the rendered html) Fred --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Check your logs to see under what name the parameter arrives (or look > at the rendered html)Where are those logfiles? in the rendered html it is correct i think: name="date[month_select]" -- 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 -~----------~----~----~----~------~----~------~--~---
Andi Geheim wrote:> >> Check your logs to see under what name the parameter arrives (or look >> at the rendered html) > > Where are those logfiles? in the rendered html it is correct i think: > name="date[month_select]"Ah okay i know what logfile you mean :) this is from this log: "date"=>{"month_select"=>"11", "year_select"=>"2008"} how can i params the month_select? -- 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 -~----------~----~----~----~------~----~------~--~---
sorry for the soliloquy. this is the solution: <%= select_month(Date.today, :prefix => ''month_select'', :field_name => '''') %> prefix is the right option -> params[:month_select] the field_name option is an extension befor the name -> if you select the november as month the value is field_name + month, default is "month". thanks and cya ;-) -- 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 -~----------~----~----~----~------~----~------~--~---