There is a new version of the FCKeditor plugin up. This fixes a problem I found when running tests. The alias method in the init.rb file was being called for every test and causing an infinite recursion. The README has also been fixed to remove the various typos people have found (thanks for the feedback).

As before you can get the plugin using:

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

There is also a demo

Sep 162006

So RailsConf Europe is over, and it was great. There is a slight possibility I may of overdone it, a bit too much burning the candle at both ends but, hey it is the weekend now!!

I had originally intended to post from inside the conference. However, the fact that I couldn’t get the wifi to work in the main auditorium kind of scuppered that. My next plan was to write up anything useful at the end of the day. However, beer scuppered that. So I then gave up on that and decided to post on Friday evening after the event. So, here I am Saturday morning grabbing a full english in the pub over the road from my house – I love it when a plan comes together!!!

Continue reading »

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

This release is basically a bug fix. The only really change is to apply the patch kindly provided by Nicola Piccinini which sorts out an issue with file upload from inside the resource manager.

There are a couple of other changes to do with the install and version numbers, but that is all internal to the plugin.

demo

There is a new version of the FCKeditor Rails plugin available details of how to get it and a demo are here.

This version fixes a problem with having multiple editors open at once on the same page and also adds a helper to allow multiple editors on the same Ajax form. This also now works with static html forms but you can just use the standard form helpers for that.

Continue reading »

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.

Continue reading »

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….

Continue reading »

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.

Continue reading »

I’ve just released the next version of the FCKeditor plugin. The main change in this version is the addition of the spell check functionality using ASpell. A big thank you to Ken Pratt for providing the patch for that and at the same time providing a solution (I hope) to the routing issues that some people have had.

If you already have this plugin installed you can upgrade by just deleting the existing install and getting it again. If you have altered the fckcustom.js file then you will need to add:

FCKConfig.SpellChecker = 'SpellerPages';

to it . If not just delete that too before reinstalling. You also need to be sure that ASpell is installed along with any dictionaries you want to use (If you are on windows check the README for the expected install directory).

Continue reading »

Ok, I admit I overreacted slightly to the Rails bug and have now realised I was talking rubbish. So here is a release that works with 1.1.6 and plays well with everybody. It also updates the install code and moves the fckcustom.js config file out of the base fckeditor install directory. This means that you can update or delete the install without having to worry about removing any customizations you have made.

In the new fckcustom.js (public/javascripts/fckcustom.js) there is also now an example of creating your own toolbar which can now be included using

<%= fckeditor_textarea("object", "field", :ajax => true, :toolbarSet => 'Simple', :width => '400', :height => '200') %>

As Jeff Owens has pointed out there are still issues with the Flash upload and I will try to address those as soon as possible.