ALl you need is a method on the child that uses he association to the parent to 
return the value.  Then create a "virtual" column to display that value.  The 
docs cover how to create a virtual column.

Michael



On Jan 27, 2011, at 4:23 PM, Lindsay Morris wrote:

> This has to be easy...
> My model:
>  Client_schedule has-many :associations
>      and a field named "action"
>  Association belongs_to :client_schedule
> 
> When I list the child records, (associations), I want to display the
> parent's "action" field too.
> 
> class AssociationsController < ApplicationController
>  active_scaffold :associations do |config|
>       config.list.columns = [
>       :schedule_name,
>       # how the heck do I do this?
>      :client_schedule.action
>    ]
>  end
> end
> 
> Thanks in advance.
> 
> -- 
> 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.
> 

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