I think I've come across a bug in searching on a virtual column.  It seems 
that search_sql has to be set to something in order for the field to show 
up in the field search form. However, if I use a proc, condition_for_column 
(lib/active_scaffold/finder.rb) runs the proc but doesn't just return the 
built condition, but continues on through and 
calls column.search_sql.collect, which errors because search_sql is a proc 
and can't be collected. 

If I use self.condition_for_week_column (week is the virtual attribute), 
that is detected, executed, and the conditions are returned properly. 
However, search_sql still has to be set to something in order for the field 
to show in the search form.

Jim Crate

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.
  • Field search on vir... Jim

Reply via email to