FYI.... I just learned something that I suppose I should have figured
out sooner, but just in case someone else has this problem: some of
the configuration options MUST be entered in the correct order, or
else they won't work properly.

Here's an example. I am displaying assets (belongs_to user, where user
has_many assets) and I want to limit the display of the assets to the
logged-on user. But for normal (i.e., non-admin) I don't want any
nested operation and I don't want to display the user_id field.
Therefore, I need to the user_id field in my column list for testing,
but not displayed.

This works:
  active_scaffold :asset do |config|
    <snip>
    config.columns =
[:entry, :entry_type, :username, :userpswd, :url, :notes ]
    config.columns.add :user_id
    config.list.columns.exclude :user_id
    end

This does not (i.e., displays the user_id field):
  active_scaffold :asset do |config|
    <snip>
    config.list.columns.exclude :user_id
    config.columns =
[:entry, :entry_type, :username, :userpswd, :url, :notes ]
    config.columns.add :user_id
    end

Definitely caused a bit of heartburn until I figured this out; hope it
helps someone else.

Cheers...jon
--~--~---------~--~----~------------~-------~--~----~
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