Scott Rutherford

Life on and off the Rails

 

So before I head off for the first event on my Rails Conf Europe calendar – Pizza on Rails (sponsored by Cominded). I thought I would mention that Richard White and myself have now released version 3.2.0 of the ajax scaffold plugin. This fixes a few bugs and a compatibility problem with generators before version 3.1.6.

The wiki contains links to various bits of documentation for both the plugin and the generator. Plugin specific posts from myself can be found here

Right, free beer and pizza…...

AjaxScaffold has been deprecated in favour of ActiveScaffold

The aim of this post is to show how to extend or replace the default functionality of the Ajax Scaffold plugin (ASp). I will go over two areas, firstly how you filter the dataset the table displays, and secondly the methods you can override to really gain control.

Read the rest of this entry

AjaxScaffold has been deprecated in favour of ActiveScaffold

One of the first things you will probably notice with the Ajax Scaffold plugin (ASp) is that works great if all you want to do is display a table showing all the fields a model has to offer. However, suppose we want to produce a table showing values that come from user defined methods on a model.

For example lets take a User model with the following fields: name, password, created_at, number_of_logins. To create a table that simply shows these fields is easy, simply add the following to the UsersController:

ajax_scaffold: user

but suppose we want one of the columns to contain only the name and the average number of logins per week / per month / per year….

Read the rest of this entry

AjaxScaffold has been deprecated in favour of ActiveScaffold

Install

The easiest way to install the plugin version of Ajax Scaffold (AS) is to use the inbuilt Rails installer script. Simply run the following command from the root of your Rails app:

ruby script/plugin install svn://rubyforge.org/var/svn/ajaxscaffoldp/trunk

This will fetch the plugin into ‘vendor/plugins’. The files required by the plugin (views, css and js) will then be copied over to the app on startup.

Read the rest of this entry

Richard White and I now have the first version of the Ajax Scaffold plugin ready. It is available from the RubyForge svn repository. Details of how to get it can be found here

There is also now a wiki covering both the plugin and the generator.

This blog used the Shay theme as a base and is powered by Mephisto