It appears yes, if you use <select-many>. I didn't realize I was. :)
"To use this tag, the model of the items the user is chosing *must* have
unique names, and the"
Not sure what the other requirement is.
Presumably <select-many> uses the name like a primary key... Is there an
easy way to the same thing as <select-many> but for models that don't have a
name field?
- Scott
On Fri, Jan 9, 2009 at 4:20 PM, Scott Bronson <[email protected]> wrote:
> From Hobo::Model:
>
> def named(*args)
> raise NoNameError, "Model #{name} has no name attribute"
> unless name_attribute
> send("find_by_#{name_attribute}", *args)
> end
>
> My application dies in this function because, it's true, my model has
> no name. It doesn't need one!
>
> Adding a useless 'name' field doesn't seem like the right solution,
> especially since it appears that Hobo requires the name to be unique.
>
> Is there a good way of solving this?
>
> - Scott
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---