# ActiveScaffold search problem

**URL:** <https://www.ruby-forum.com/t/activescaffold-search-problem/193845>\
**Category:** Rails\
**Created:** [August 25, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/activescaffold-search-problem/193845 "2010-08-25T13:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [August 25, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/activescaffold-search-problem/193845/1 "2010-08-25T13:58:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [August 25, 2010, 3:14pm UTC](https://www.ruby-forum.com/t/activescaffold-search-problem/193845/2 "2010-08-25T15:14:35Z")

</div>

2010/8/25 Zack N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> update\_record\_from\_params):
> 
> I have never used _active scaffold_ myself, but my general understanding  
> of 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/](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_

---

<div class="post-metadata">

**Author:** ![jakx12](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/2bfe46/32.png) [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Post date:** [August 25, 2010, 3:27pm UTC](https://www.ruby-forum.com/t/activescaffold-search-problem/193845/3 "2010-08-25T15:27:26Z")

</div>

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?
