Scott Rutherford

Life on and off the Rails

 

AjaxScaffold 3.2.3 Released

January 23rd, 2007

We released a new version of AS today which fixes the issues with prototype and rico when using Rails 1.2.1. For details of the issue you can see my previous post.

This is simply a fix for the v3 plugin and contains none of the new (and very exciting stuff) coming in v4. It should be a straight upgrade for anyone on 3.2.2.

AjaxScaffold and Rails 1.2.1

January 22nd, 2007

There is an issue with the latest release of Rails and AjaxScaffold. Well actually the problem is in a conflict between Prototype and Rico Corner, if you find that all the AJAX stops working – lots of spinning indicators and not much else you have three choices, wait a little and we will likely release an update, or if you are impatient / desperate for a fix you can use the following patch for prototype or you can remove the Rico Corner include…...

Read the rest of this entry

I”ve been asked a couple of times how to dynamically setup the columns displayed by the AS plugin dependant on the permissions of the user, so I though a quick post would be a good idea.

Basically its very simple, you simply define a hash of all the columns you potentially wish to display keyed by the column name, so something like:

@@columns_hash[:user] = ScaffoldColumn.new(..)
@@columns_hash[:foo] = ScaffoldColumn.new(:name => 'bar')

Then define a before_filter along the lines of:

before_filter :create_columns, :only => ['table', 'update_table']

Read the rest of this entry

I released a new version of the plugin today that fixes a few outstanding issues and adds 3 new extension points. The main things that have been fixed are:

  1. Single table inheritance now works
  2. Legacy table names are now supported
  3. The table formats properly under IE

The 3 extra extra extension points are

  1. do_new
  2. do_edit
  3. do_delete

I will update the post on extending the plugin to fully cover these new features.

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.

So Richard White caught up with me a couple of days ago through Technorati and we had a chat about the development of his Ajax Scaffolding as a Rails Plugin. We have agreed to work together on this (which is great) and develop the generator and the plugin in sync (As he also notes in his (kind) comments on the 3.1.3 release of the generator).

Hopefully the first release of the plugin should not to be too far away and will add a little functionality to the existing code.

Read the rest of this entry

Ajax Scaffold

July 2nd, 2006

This is a nifty scaffold generator created by Richard White (email, Height1Percent , MiniElements). It produces a CRUD AJAX table element in place of the standard Rails scaffolding.

AjaxScaffold Website

AjaxScaffold Presentation

Read the rest of this entry
This blog used the Shay theme as a base and is powered by Mephisto