Scott
2007-Jun-06 22:50 UTC
:prompt on collection_select worked locally but had to change when moving to hosted env
This is sort of a strange one. I had the following abbreviated form: <% form_for :product, :url => {:action => "preview_item", :id => @product}, :html => {:multipart => true} do |form| %> form.collection_select(:department_id, @departments, :id, :name, {:prompt => "select a department"}) <%end%> This worked fine with locomotive and with the hosted enviroment I was working with that used mongrel. I then moved it to a different hosted env using lighttpd and fastCGI. I froze my rails before deploying. When I deployed, I noticed the select statement wasn''t being honored. However if I change it to the following: <% form_for :product, :url => {:action => "preview_item", :id => @product}, :html => {:multipart => true} do |form| %> collection_select(''product'', ''department'', @departments, :id, :name, {:prompt => "select a department"}) <%end%> For some reason, getting rid of the form, adding product and changing department_id to department caused this to work. Can anyone shed some light on this? Thanks, Scott --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Scott
2007-Jun-07 06:08 UTC
Re: :prompt on collection_select worked locally but had to change when moving to hosted env
Anyone? On Jun 6, 3:50 pm, Scott <tamosu...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> This is sort of a strange one. > > I had the following abbreviated form: > > <% form_for :product, :url => {:action => "preview_item", :id => > @product}, :html => {:multipart => true} do |form| %> > form.collection_select(:department_id, > @departments, > :id, :name, > {:prompt => "select a department"}) > <%end%> > > This worked fine with locomotive and with the hosted enviroment I was > working with that used mongrel. > > I then moved it to a different hosted env using lighttpd and fastCGI. > I froze my rails before deploying. When I deployed, I noticed the > select statement wasn''t being honored. However if I change it to the > following: > > <% form_for :product, :url => {:action => "preview_item", :id => > @product}, :html => {:multipart => true} do |form| %> > collection_select(''product'', ''department'', > @departments, > :id, :name, > {:prompt => "select a department"}) > <%end%> > > For some reason, getting rid of the form, adding product and changing > department_id to department caused this to work. > > Can anyone shed some light on this? > > Thanks, > > Scott--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mark Reginald James
2007-Jun-07 06:56 UTC
Re: :prompt on collection_select worked locally but had to change when moving to hosted env
Scott wrote:> <% form_for :product, :url => {:action => "preview_item", :id => > @product}, :html => {:multipart => true} do |form| %>Should that be <% form_for :product, @product, ... ? -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---