Hi,
I'm trying to use the multi_select option in search_ui as per the
instructions of the api-column. More specifically, I've set up two
models:
class Issue < ActiveRecord::Base
belongs_to :state
class State < ActiveRecord::Base
has_many :issues
In the issue controller, I've defined:
...
config.columns =
[:issue_number, :issue_date, :publication, :state]
config.columns[:state].search_sql = 'states.name'
config.columns[:state].search_ui = :multi_select
config.actions.swap :search, :field_search
config.field_search.columns =
[:issue_number, :issue_date, :publication, :state]
...
However when I click in the search button I get the following message
in the error log:
ActionView::TemplateError (You have a nil object when you didn't
expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.collect) on line #28 of vendor/
plugins/active_scaffold/frontends/default/views/
_field_search.html.erb:
25: <label for="<%= "search_#{column.name}" %>"><%=
column.label %></label>
26: </dt>
27: <dd>
28: <%= active_scaffold_search_for(column) %>
29: </dd>
30: </dl>
31: </li>
However if I use :select instead of :multi_select everything runs
fine. I would appreciate some help on this since I'm utterly lost. I'm
using Rails 2.3.4 and the master branch of ActiveScaffold
Thanks in advance
Pedro.
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.