Hi,

I'm trying to put active scaffold into a controller that does not have
an underlying model.

I therefore picked a model that had some of the fields already and
created a new controller like this:


class XyzController < ApplicationController

  active_scaffold :users do |config|

    config.columns = [ ........ ,  :employer1, :employer2 ]


Now I need some of the associated fields from another model.

The only hint that I got from the API:Core document on the wiki is
that @user.user_group is the format for associated columns.
But when I use that I get:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.employer1

Obviously I'm doing something really wrong - I just can not see what.

The associations are working just fine User.find(...).form.employer1
produces the right thing.

Just to confirm - the associated models are done with ActiveRecord -
there is no requirement to have an ActiveScaffold controller for both
models ?
--~--~---------~--~----~------------~-------~--~----~
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