Hi all
I am trying to do a custom field search based on parent:
db table : businesses
{
id
parent_id
name
}
class Business < ActiveRecord::Base
acts_as_tree, :order => :name
end
In my controller:
active_scaffold :business do |config|
config.actions.exclude :search
config.actions << :field_search
config.columns[:id].search_sql = "businesses.id"
config.columns[:parent_id].search_sql = "businesses.parent_id"
config.field_search.columns = [:id, :parent_id, :name]
end
The search section shows up with parent_id (treated as integer, as I
see equal, less-than ..etc) comparators. How ever when I do a search
for parent_id = 10, I get
undefined method `downcase' for {"from"=>"10", "to"=>"",
"opt"=>"="}:HashWithIndifferentAccess
The error happens even if I skip the 'search.sql' definition for
'parent_id'
ENV:
rails 2.2.2
AS latest GIT version
what am I missing?
thanks so much!
Sujee Maniyam
http://sujee.net
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---