You can set the include-none option to false on your select-one to remove the (No Week) in your input. I'm not sure why you're not getting the error form -- you should be. Are you using the default controller actions? I usually use "validates_existence_of" instead of "validates_presence_of", but that shouldn't make a difference here.
Bryan On Jul 7, 8:42 am, bcavileer <[email protected]> wrote: > I have another little problem I've been unable to solve. > > I have two models, Result and Week. > Results belong_to Week. > Weeks have_many Results. > > On my *User Show* page I have added a form to create a new Result and > Hobo happily generates a form for the Result complete with a drop-down > list to select a Week. > > Problem: The first value of the list is "(No Week)". > > Is there an easy Hobo way of removing the "(No Week)", in effect > requiring the result to have a week? > > I've tried using validates_presence_of :week_id. When I submit a new > Result with (No Week) selected I am redirected > tohttp://localhost:3000/results/ > > I would think it would redirect me tohttp://localhost:3000/users/#-user-name > (the show page) and have a error field showing you need to select a > week. This seems like an odd behaviour to me but it probably makes > sense to you guys. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
