Ok so I have two problems with activescaffold and searching. The first is an error I get when trying to search with the advance active scaffold search plugin. nothing happens and I get this error on the page: ActionController::UnknownAction (No action responded to update_table. Actions: attributes_hash_is_empty?, column_value_from_param_value, create, delete, destroy, edit, edit_associated, find_or_create_for_params, index, list, manage_nested_record_from_params, nested, new, render_field, row, show, show_advanced_search, show_search, table, update, update_column, and update_record_from_params): My other issue is that i have a field in one of my models which is called user_id, it is an id of a user, hence the name. Now when that appears in the table generated by active scaffold its an integer, so I overrode that to show the name of that user. however when I use the standard search provided by active scaffold it still thinks its an integer and so I would like to know how i can make it search for the name. Thanks! -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/8/25 Zack Nathan <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> Ok so I have two problems with activescaffold and searching. The first > is an error I get when trying to search with the advance active scaffold > search plugin. nothing happens and I get this error on the page: > > ActionController::UnknownAction (No action responded to update_table. > Actions: attributes_hash_is_empty?, column_value_from_param_value, > create, delete, destroy, edit, edit_associated, > find_or_create_for_params, index, list, > manage_nested_record_from_params, nested, new, render_field, row, show, > show_advanced_search, show_search, table, update, update_column, and > update_record_from_params): > > I have never used *active scaffold* myself, but my general understandingof this error is that you need to add a special action *update_table* (in your * ActionController*) which processes your resquest. Otherwise, I see some similar methods which I may advise you to check whether they can do what you want: *update*, *update_column*, and *update_record_from_params*.> My other issue is that i have a field in one of my models which is > called user_id, it is an id of a user, hence the name. Now when that > appears in the table generated by active scaffold its an integer, so I > overrode that to show the name of that user. however when I use the > standard search provided by active scaffold it still thinks its an > integer and so I would like to know how i can make it search for the > name. >Did you add the id in your model? Look at the following: class User < ActiveRecord::Base set_primary_key :user_id *# the rest of the code here* end> > Thanks! >--- Edmond Software Developer | Baobab Health Trust (http://www.baobabhealth.org/) | Malawi Cell: +265 999 465 137 | +265 881 234 717 *"Many people doubt open source software and probably don’t realize that there is an alternative… which is just as good.." -- Kevin Scannell* -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for the quick reply! I dont think making it a primary_key will fix it. I came up with an idea of haveing a custom search form with a dropdown menu of all the users and the value that would be passed would be an id. I just dont know how to do that. I also dont quite get what you mean by "check that they can do what you want", its a plugin so surely it would be ok? -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.