Toffee v0.1

I have got my plugin working with Rails 1.2, and its now sitting on the open.bluefountain.com repository. Here's a quick guide to install it:

1. Ensure you are using Rails 1.2, otherwise it could go horribly wrong Laughing

2. In the root of your Rails application, type the following command:

script/plugin install http://svn.open.bluefountain.com/toffee

3. Edit app/controllers/application.rb adding so it looks as follows:

class ApplicationController < ActionController::Base

  include Toffee

  ...

end

4. Add the following line to config/routes.rb, before the default route and any other routes you've added:

map.from_plugin :toffee

5. Then, add the following line to any models you want Toffee to manage:

class MyModel < ActiveRecord::Base

  enable_toffee

  ... 

end

6. Now, with your app running, go to URL '/admin/my_model'. You should be presented with a list screen for your model.

For more detailed options, and how to tailor the screens to your needs, check the README file.  

 

dfitzgibbon on February 9, 2007 - 1:20pm. dfitzgibbon's blog
Submitted by jbreckon on February 9, 2007 - 2:56pm.

I tried it and it sucks!

Submitted by Ian J Cottee on February 10, 2007 - 7:02pm.

Sitting here at 3 in the morning waiting for the paracetamol to kick in for my killer throat. Thought I'd give this a try. Worked first time - not had time to play with it in anger but looks impressive. Only obvious item to fix is to make text data types (e.g. comments) rendered as text areas. Also how about taking a classes to_s method (if it has one) to render related records within a list box, if the related model class doesn't have toffee_select_list_text defined? and what's that unholy purple colour at the top? ;) Great work anyway - I'm impressed. Where do we post bugs, suggestions?

Submitted by dfitzgibbon on February 11, 2007 - 5:55am.

Cheers Ian, next time I speak to Andy I'll ask him what my password is for open.bluefountain.com, and I'll set up a page on there for it, so presumably there'll be some facility on there for bugs/suggestions.