Skip to content

Getting Started Old

clyfe edited this page Feb 26, 2012 · 1 revision

Old versions

For rails 3.0 use the gems version 3.0.23 and for rails 2.3.x rails use the second command (or third one if you need backwards compatibility)

gem install active_scaffold -v 3.0.23
./script/plugin install git://github.com/activescaffold/active_scaffold.git -r v2.4
./script/plugin install git://github.com/activescaffold/active_scaffold.git -r rails-2.3

Rails 2.3.x needs the plugin render_component for nested and embedded scaffolds

./script/plugin install git://github.com/ewildgoose/render_component.git -r rails-2.3

In rails 3.0 use rails g active_scaffold_setup (or rails g active_scaffold_setup jquery to use jquery instead of prototype) and it will download required js files to your public/javascript directory, update application layout and put a initializer to enable jquery in last case.

In rails 2.3.x use script/generate resource and create the layout by yourself, or use script/generate scaffold and remove generated controller code and the views.

Add this inside your layout:

<%= javascript_include_tag :defaults %>
<%= active_scaffold_includes %>

Add this inside the controller you want to run the scaffold:

active_scaffold :<your_model_name>

Add :active_scaffold => true to your routes.rb file:

map.resources :<your_model_name>, :active_scaffold => true

In rails 3.0 you use as_routes in your routes.rb file instead:

resources :users do
  as_routes
end
Clone this wiki locally