On Oct 30, 2009, at 1:17 PM, tom wrote:

>
> hi,
>
> im new to hobo, but not to rails. in fact i discovered it today.
> im my model i gave
> - title
> - enabled :boolean
>
>
> how can i make sure ONLY ONE record in that table is enabled==true? is
> there a add. validation rule in hobo?

Welcome to Hobo! You're in for quite a ride... :)

A couple things:

- In the interest of keeping things clear, can you set your name to  
something more specific than just 'tom'? Not a huge issue, but there's  
already somebody here who answers to just plain 'Tom'. :)

- Note that all the usual Rails stuff still works (if you find  
something that *doesn't*, please let us know!), so you can use the  
same validation/callback logic that you'd use in Rails. In this case,  
probably an after_save or something that turns off the other enabled  
bits when a new one is set.

Hope this helps!

--Matt Jones


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to