[LRUG] REST and Associations

Piers Cawley pdcawley at bofh.org.uk
Wed Feb 28 04:21:42 PST 2007


"David A. Black" <dblack at wobblini.net> writes:

> Hi --
>
> On 2/28/07, Piers Cawley <pdcawley at bofh.org.uk> wrote:
>> "David A. Black" <dblack at wobblini.net> writes:
>>
>> > HI --
>> >
>> > On 2/27/07, Piers Cawley <pdcawley at bofh.org.uk> wrote:
>> >
>> >> The problem I have with the current routing approach is that you have
>> >> to know too much to generate them. If I've got things set up so that
>> >> (for instance) comments are nested within articles, then I don't want
>> >> to have to call 'comment_url comment.article, comment'.
>> >
>> > You might find my inferred_routes plugin of interest; it's available at
>> > http://www.risleydale.net/svn/inferred_routes/tags/0.1.1
>> >
>> > One fix has been submitted that I haven't applied yet (involving
>> > CamelCase model names), but in general the idea is that it enables you
>> > to do:
>> >
>> >   comment_url(comment)
>> >
>> > and it infers comment.article for the missing first argument.
>>
>> Will do. You might like to take a peek at
>> http://www.bofh.org.uk/articles/2007/01/25/initial-release-of-acts_as_resource,
>> which aims to do a similar thing.
>
> Cool.  One problem: I'm getting a blank page for the article view,
> though I can see the text when I go to the Ruby category and scroll
> down.

Coo... that's... less than wonderful...

>
> Next time I'm in the UK we should all have a Rails/REST gathering.
> I'd love to talk further about all this stuff.  I have various
> semi-formed thoughts and ideas swirling around in my head....
>
>
> David
>
>> --
>> Piers Cawley <pdcawley at bofh.org.uk>
>> http://www.bofh.org.uk/
>> _______________________________________________
>> chat mailing list
>> chat at lrug.org
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>>
>
>
> -- 
> Q. What is THE Ruby book for Rails developers?
> A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
>    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
> Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
> A. Ruby Power and Light, LLC (http://www.rubypal.com)
> _______________________________________________
> chat mailing list
> chat at lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>

-- 
Piers Cawley <pdcawley at bofh.org.uk>
http://www.bofh.org.uk/



More information about the Chat mailing list