[ANN] Restflection Plugin


#1

"Restflection is a Ruby on Rails plugin designed for use in applications
which follow RESTful conventions. It allows you to extract information
about resources without necessarily knowing what they are called.

For example, instead of writing article_path, you could write
restflect(:member).path. Why would you do this? You may have shared
code, for instance layouts or library files, which need to make use of a
resource, but because they operate on any number of different resources,
they cannot refer to them by name. The plugin could also be of use to
other plugins."

Blog post: http://jonathanleighton.com/blog/restflection-rails-plugin
Documentation: http://jonathanleighton.com/projects/restflection

Feedback is always welcome.

Jon


#2

Jon,
You seem very enlightened in the RESTful world. If appropriate I’d
like to ask you a question.
I’ve got a VERY nested Rails application that will often call tables 4
or five levels deep. For example
LevelFiveTable_path(@tableone.tabletwo.tablethree, (you get the
picture).find(tablefive:params)
Is there a way to make this look prettier?
Thanks,
David

On Jun 1, 7:07 pm, Jon L. removed_email_address@domain.invalid


#3

BraveDave wrote:

I’ve got a VERY nested Rails application that will often call tables 4
or five levels deep. For example
LevelFiveTable_path(@tableone.tabletwo.tablethree, (you get the
picture).find(tablefive:params)
Is there a way to make this look prettier?

No idea really, especially without knowing the context of your app. You
might find this helpful though:
http://weblog.jamisbuck.org/2007/2/5/nesting-resources