www.SmarteGuru.com
  Home | Blogs | Recipe | Find a Friend | Discussion Board | Resources | Developers Area | Articles | Health |  Login | Register Now 

ActiveScaffold plugin: CRUD functionality for ruby on rails application

Most web applications have many more model objects exposed on the backend, or admin side, than they do on the front. Coding interfaces for all those models is redundant and a waste of resources when all you need is CRUD functionality that’s smart enough to handle all your ActiveRecord associations.

Enter the ActiveScaffold plugin. ActiveScaffold provides you with a wealth of dynamically created goodness:

  • An AJAXified table interface for creating, updating, and deleting objects
  • Automatic handling of ActiveRecord associations
  • Sorting, Search and Pagination
  • Graceful JavaScript degradation
  • RESTful API support (XML/YAML/JSON) baked in
  • Sexy CSS styling and theming support
  • More extension points than you can shake a stick at
  • Guaranteed to work on Firefox 1+, IE 6+ and Safari 2+
  • Released under the MIT License, the same one as Rails itself, so you can use it freely in your commercial applications.

Getting Started (or read the full tutorial)

Install the latest version of the plugin:

git clone git://github.com/activescaffold/active_scaffold.git vendor/plugins/active_scaffold && rm -rf vendor/plugins/active_scaffold/.git

or keep the .git directory and switch to the “next” branch (cd vendor/plugins/active_scaffold && git checkout next) and get the latest updates as the core team submits them. However, the “next” branch can be highly unstable (perhaps not even fully tested) and is not recommended.

Add this to your layout:

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

Add this to your controller:

active_scaffold :<your_model_name>

.. for example:

class UsersController < ApplicationController active_scaffold :user end

That’s it! Your first ActiveScaffold is up and running.

Related Posts

Tags: , , , ,


Viewed: 514 views

One Response to “ActiveScaffold plugin: CRUD functionality for ruby on rails application”

  1. srb Says:

    Be aware that the activescaffold team has badly dropped the ball on their support though. Their wiki is blanked out – to see what was there you need use google cache or the wayback machine – their demo is similarly missing files from the download and pages from their online version. There are message groups all over the place for it that may or may not contain answers you are looking for. I don’t know how long this has been the case but I just used their scaffold on a project and was immensely frustrated by the difficulty of figuring things out when it should have been easy.

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.

Home - About Us - Help - Terms and Conditions - Site Map - Link to Us - Resources - Contact Us
Google Rank Calculator | Suggest developer resource | Suggest Article
All rights reserved © 2007 SmarteGuru.com.