Thanks to everybody who helped.I got  AS working with rails 2.1.

I set up an embedded list like this.

I created a controller for the scaffold like this.

active_scaffold :model do | config|
    config.columns = [:col1,
      :col2,
      :col3,
          ]
    config.list.columns =[:col1, :col2]
    config.list.per_page = 10
  end

I then call this from the view of my controller like this.

render :active_scaffold => :as_controller_name,
                      :constraints => @as_constraints


Everything is great except I am a little worried about security.

My controller has before filters to check for security and to make
sure the dataset has the right restraints.  Unless I duplicate all
that code in the as_controller anybody is going to be able to go to
/ascontroller and manipulate ALL the record in the table.

I tried to require admin rights for the as_controller but that makes
the controller embedding the scaffold fail which is too bad since that
would be the perfect way to create admin screens and also make your
lists.

Is there a clever hack I am missing?  Is there a way to embed a
scaffold without building a controller for it?

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