# \[ANN\] Toffee Plugin - Controller-less admin screens

**URL:** <https://www.ruby-forum.com/t/ann-toffee-plugin-controller-less-admin-screens/85794>\
**Category:** Rails\
**Created:** [February 16, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-controller-less-admin-screens/85794 "2007-02-16T12:01:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@davidf](https://www.ruby-forum.com/u/davidf)\
**Post date:** [February 16, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-controller-less-admin-screens/85794/1 "2007-02-16T12:01:44Z")

</div>

Hi All,

I am hoping that some of you would like to try my Engine-Style plugin  
for Rails 1.2, its in its very early stages. It allows you to view admin  
screens (list, edit, create, delete etc) for models without the need to  
create extra controllers or views.

Sorry there’s no site up or screencast but it really is a piece of cake  
to get up and running, simply do…

script/plugin install [http://svn.open.bluefountain.com/toffee](http://svn.open.bluefountain.com/toffee)

Then add the following in config/routes.rb before the default route and  
any you’ve added yourself.

map.from\_plugin :toffee

Then start your app, and go to the url ‘/admin/\<your\_model\>’ then follow  
the instructions on screen.

If you would like a different prefix you can manually add the route  
instead of using map.from\_plugin, as follows:

map.connect ‘my\_prefix/:model/:action/:id’, :controller =\> ‘toffee’

Thanks in advance to anyone who gives it a try,

David F…

---

<div class="post-metadata">

**Author:** ![davidf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@davidf](https://www.ruby-forum.com/u/davidf)\
**Post date:** [February 16, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-controller-less-admin-screens/85794/2 "2007-02-16T13:41:38Z")

</div>

I like where it’s heading, however right now it’s seems like a  
slightly enhanced scaffolding (I didn’t dig too deep, so pardon me if  
I missed something). I specially like being able to define custom  
options for each model.

What I’d really like though (and I assume this is the goal with  
toffee) is a more full blown admin, with some real authentication, an  
index page with some stats from toffee enabled models, an WYSIWYG  
editor for text fields and stuff like that. I’d really consider using  
it for simpler projects if it had all that, else I don’t see how it  
can be very useful. I also like the search function, which is  
something that scaffolding doesn’t give you.

Anyway, just my $0.02, good luck with your plugin!

On Feb 16, 9:01 am, David F. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![davidf](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/f07891/32.png) [@davidf](https://www.ruby-forum.com/u/davidf)\
**Post date:** [February 16, 2007, 2:31pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-controller-less-admin-screens/85794/3 "2007-02-16T14:31:25Z")

</div>

Thanks for taking the time to try it out, I’m glad it worked :o)

Regarding Authentication, Toffee will inherit whatever authentication  
the rest of the application is using, you can also add any special  
conditions by adding a ToffeeController in RAILS\_ROOT/app/controllers. I  
didn’t want to put people off by including authentication stuff that I  
liked but which they might dislike.

I also would like to point out that I don’t expect Toffee to be tailored  
to replace a full blown web application. It is merely a quick and easy  
way to see (and manipulate) the models, fields and data that a web app  
is built upon. It just cuts out some of the tedious work involved in  
building simple generic admin screens.

However I do fully admit that there are a lot more capabilities that  
could be exploited.
