Hi Patrick,

activescaffold does nt know that your virtual column is existing.

Please add the following at the top of your activescaffold config:
conf.columns.add :my_virtual_column

--
Volker

On Jun 21, 7:02 pm, patrick99e99 <[email protected]> wrote:
> > I would suggest to add a virtual column and adding a corresponding
> > setter in your model in wich you trigger your state machine method.
>
> Hello Volker,
>
> Well...  I tried doing this:
>
> in my controller:
>
>     config.update.columns = [:my_virtual_column]
>     config.columns[:my_virtual_column].form_ui = :select
>     config.columns[:my_virtual_column].options = {:options =>
> [:state_machine_method_1, :state_machine_method_2, :state_machine_method_3]}
>
> and in my model:
>
>     def my_virtual_column
>       real_column_name
>     end
>
>     def my_virtual_column=(state_machine_mathod)
>       send(stage_machine_method)
>     end
>
> However, Just when trying to display the resource list, I get:
>
> undefined method `form_ui=' for nil:NilClass
>
> Which must mean that virtual columns can't have things like .form_ui
> called on them....  Or am I doing something wrong?
>
> Thanks...
> -patrick

-- 
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.

Reply via email to