My goal: Offer the oportunity to extend the given options of a collection_select with custom text within a form My problem: The collection''s ressource is the same the form data will be saved to, so I cannot update the corresponding collection prior to submitting the form as a whole. Has anyone a smart and simple solution to that? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Craig White
2008-Mar-16 02:17 UTC
Re: ****[Rails] Need suggestions on how to extend collection_select in form
On Sat, 2008-03-15 at 19:11 -0700, jawosis wrote:> My goal: Offer the oportunity to extend the given options of a > collection_select with custom text within a form > > My problem: The collection''s ressource is the same the form data will > be saved to, so I cannot update the corresponding collection prior to > submitting the form as a whole. > > Has anyone a smart and simple solution to that?---- in the controller, before you save... params[:form_name].delete("field_name") Craig --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---