A module I use for object listings, etc…

10Feb07

This is just a nice little bit of added convention for making it super easy to create apps…I define partials: ‘_list’ and ‘_<%=model_name.underscore-%>’, and then any time I want to show a list or a single object, I use the helper methods:


object_list @collection
object_listing @object

You can find the module right here. To include it in your app, put it in lib/ and inside ApplicationHelper (for instance), put:


include ObjectListHelper

I don’t know…comment and tell me how dumb I am because I should *totally* have this in a plugin registering the helper, and then calling it via helper :object_list, I know…

Advertisements


No Responses Yet to “A module I use for object listings, etc…”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: