gregbell/active_admin — Issue #755: collection proc, instance_eval
Author: ordinaryzelig
Created: 2011-11-16 14:54:51+00:00
State: open

I was trying to make a filter with a grouped select. I tried many things but couldn't get it to work because I didn't have access to view helpers.

I saw that you can use a proc for collection. Wouldn't it make more sense to use instance_eval instead of Proc#call so that more is exposed to the proc to be utilized? It would be more powerful if he proc could have access to what the form builder has access to. Since the filters are declared in the registration, there is a limited amount that one can do in terms of customization. You normally see formtastic-ish declarations like that in ERB templates. There, you can pass things to collection like a string literal of the option tags that is composed from using view helpers like `grouped_options_for_select`.