Ok, i found and fixed this in AS. In finder.rb:37 in case search_ui.
i fixed support for record_select in field_search adding this to the
case:
when :record_select
["#{column.search_sql} = ?", value] unless value.blank?
record_select worked before just in create or update, since they use
update_record_from_params which is a much powerful parser, which
supports params of both kinds:
"search"=>{"assoc_model"=>"1234"} (record_select style)
and
"search"=>{"assoc_model"=>{"id=>"1234"}} (AS select style)
i put this here in case someone else is interested in it
On Feb 27, 2:07 pm, naaano <[email protected]> wrote:
> using 2.2 + edwinmoss AS branch + RS from github, isn't searching for
> me, because name attribute isn't correct:
> with :select
> <select name='search[column][id]' ....
>
> with :record_select
> <input name='search[column]' ....
>
> (where column is the name of the column)
>
> Making finder to ignore this. If i change the name via Firebug, it
> works perfectly.
> i've been looking AS helpers but can't find where this is set.
>
> My configs are:
> config.field_search.columns << :source
> config.columns[:source].form_ui = :record_select
> config.columns[:source].search_sql = 'documents.source_id'
>
> any guess?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---