Forum: Ruby on Rails [ANN] Restflection Plugin

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5b4cc2b3895cc34e3bcef32025c3cafd?d=identicon&s=25 Jon Leighton (turnip)
on 2007-06-02 02:07
"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
18989f5699fa8619c8e9b301b6cb5088?d=identicon&s=25 BraveDave (Guest)
on 2007-06-02 15:52
(Received via mailing list)
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 Leighton <rails-mailing-l...@andreas-s.net>
5b4cc2b3895cc34e3bcef32025c3cafd?d=identicon&s=25 Jon Leighton (turnip)
on 2007-06-02 16:33
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
This topic is locked and can not be replied to.