# \[ANN\] Toffee Plugin 0.2 - Automated Admin Screens

**URL:** <https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971>\
**Category:** Rails\
**Created:** [April 3, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971 "2007-04-03T13:50:57Z")\
**Posts on this page:** 6\
**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:** [April 3, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/1 "2007-04-03T13:50:57Z")

</div>

Toffee is a plugin that gives you automatic controller-less admin  
screens for your Rails models. Simply going to the URL /admin/model\_name  
will bring up an admin screen for that model, allowing you to view,  
edit, create and delete records belonging to it.

Also I’ve now added a toffee\_list helper, so you can insert a customised  
toffee-style list anywhere in your application simply by putting \<%=  
toffee\_list ‘model\_name’ %\> in your view. Check out the links below:

Installation guide:  
[http://open.bluefountain.com/software/toffee](http://open.bluefountain.com/software/toffee)

Usage guide:  
[http://open.bluefountain.com/software/toffee/documentation/how-to/using-toffee-in-your-rails-application](http://open.bluefountain.com/software/toffee/documentation/how-to/using-toffee-in-your-rails-application)

toffee\_list helper guide:  
[http://open.bluefountain.com/software/toffee/documentation/how-to/using-the-toffee\_list-helper](http://open.bluefountain.com/software/toffee/documentation/how-to/using-the-toffee_list-helper)

---

<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:** [April 5, 2007, 9:23am UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/2 "2007-04-05T09:23:12Z")

</div>

Great plug-in, I love the functionality.

I have a question though, how can you make this plug-in work just like  
in the tutorial but work with existing auth systems?  
restful\_authentication or AAA for example. We have a standard  
before\_filter auth check on every controller, but I don’t want  
everyone to have access to [site.com/model/admin](http://site.com/model/admin) (Even though they  
should have access to the regular actions in that controller/model).  
Thanks.

On Apr 3, 1:50 pm, David F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<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:** [April 5, 2007, 10:05am UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/3 "2007-04-05T10:05:49Z")

</div>

Marston A. wrote:

> Great plug-in, I love the functionality.
> 
> I have a question though, how can you make this plug-in work just like  
> in the tutorial but work with existing auth systems?  
> restful\_authentication or AAA for example. We have a standard  
> before\_filter auth check on every controller, but I don’t want  
> everyone to have access to [site.com/model/admin](http://site.com/model/admin) (Even though they  
> should have access to the regular actions in that controller/model).  
> Thanks.
> 
> On Apr 3, 1:50 pm, David F. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

You can add a file called toffee\_controller.rb in your app/controllers  
folder, containing something like…

class ToffeeController \< ApplicationController

before\_filter :your\_auth\_stuff

end

This should do it, if not let me know and I’ll try it out myself.

Thanks for trying it out!

---

<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:** [April 6, 2007, 7:26am UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/4 "2007-04-06T07:26:25Z")

</div>

Hm … can`t use this plugin.  
on request admin/article i see this errors:

> NoMethodError in ToffeeController#index  
> super: no superclass method `setup’

what`s wrong?

–  
Sorry to my english ☹

---

<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:** [April 5, 2007, 12:08pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/5 "2007-04-05T12:08:02Z")

</div>

David,

Thanks, I’ll give it a shot.

On Apr 5, 10:05 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:** [April 6, 2007, 4:42pm UTC](https://www.ruby-forum.com/t/ann-toffee-plugin-0-2-automated-admin-screens/90971/6 "2007-04-06T16:42:51Z")

</div>

Konstantin G Tumalevich wrote:

> Hm … can`t use this plugin.  
> on request admin/article i see this errors:
> 
> > NoMethodError in ToffeeController#index  
> > super: no superclass method `setup’
> 
> what`s wrong?
> 
> –  
> Sorry to my english ☹

Sorry about that, I’ve fixed that now, please re-install and try again.
