You already had it working with select-many right?  So it's got
the :accessible => true for the tags association.

that particular part of the trace doesn't help much since it's all
general code.  I'd be interested in the parameters sent with the call,
any custom controller update (which it looks like that's not the
case), and the relevant parts of the models.

On Nov 18, 8:59 pm, Mark Sobkowicz <[email protected]> wrote:
> I am still working on the problem of users tagging recipes.   I could not use 
> <select-many>, because <select-many> requires that the items being selected 
> from have unique names, and I want users to make their own tags, so that some 
> might indeed have the same name.   I want the users to tag recipes on the 
> show-page, rather than the edit page, since only the owner of a recipe can 
> edit the recipe.   So on the recipe show page I put:
>
>                                 <form update="recipe">
>                                         <check-many:tags/>
>                                 <submit label="Update Tags"/>
>                                 </form>
>
> And I get the right thing on the page - a list of the user's own tags, with 
> checkboxes.   If I click the "Update Tags" button, I get an error.
>
> ActiveRecord::AssociationTypeMismatch (Tag expected, got String):
>   hobo (1.0.1) lib/active_record/association_proxy.rb:20:in 
> `raise_on_type_mismatch'
>   hobo (1.0.1) lib/hobo/model.rb:399:in `send'
>   hobo (1.0.1) lib/hobo/model.rb:399:in `attributes='
>   hobo (1.0.1) lib/hobo/permissions.rb:194:in `user_update_attributes'
>   hobo (1.0.1) lib/hobo/permissions.rb:171:in `with_acting_user'
>   hobo (1.0.1) lib/hobo/permissions.rb:193:in `user_update_attributes'
>   hobo (1.0.1) lib/hobo/model_controller.rb:593:in `hobo_update'
>   hobo (1.0.1) lib/hobo/model_controller.rb:156:in `update'
>   hobo (1.0.1) lib/hobo/controller.rb:23:in `call'
>   hobo (1.0.1) lib/hobo/controller.rb:23:in `included_in_class'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in
>  `service'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in
>  `run'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in
>  `start_thread'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in
>  `start'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in
>  `start_thread'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in
>  `start'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in
>  `each'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in
>  `start'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in
>  `start'
>   
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in
>  `start'
>
> By the way, the page itself freezes on the browser window (Safari), and the 
> error page html shows up as text in a modal dialog box - I can't get rid of 
> it and have to quit the browser.

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