On Aug 13, 2:14 pm, Stephan Meier <[email protected]> wrote: > Hey all, > > im not sure where to set a default value if a textfield is empty? > > For now i do it in the controller, and check if the submitted parameter > is blank. > But this seems not to be the best solution... > > Thanks for your help! > -- > Posted viahttp://www.ruby-forum.com/.
What is the purpose of the default value? Do you want a newly created row in the database to have a default value if none is specified? If so, thats where the default value goes. Do you need some sort of default value when processing some sort of logic that the form is the input source for? Then the default value should go somewhere close to where the logic is happening. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

