good work on the handbook by the way.

my thinking behind defining at the route level would enable  the
scoping to be automatically known, as the resource_route would hold
the specifications.
These can then be parsed on the controller just b4 dispatching to the
controller action, from the specifications we would automatically know
what scope we where in.

so basically a route would have specifications sent through the
options when generating from the behaviors.

images_controller.resource_specifications == [comment_spec,
images_spec]  from the url  "comment/1/images"
images_controller.resource_specifications == [myhome_spec,
images_spec] from the url    "myhome/images"


then just as the controller has some nice remixes for the
authentication and conditional_get goodness we could also mixin
resourceful type goodness,

hell we already have the resource method that generates a resource
url, which should really be called "resource_url" not "resource"

and another bit of crazyness would be to have with_specification :type
=> dm or activerecord or whatever really, just defines how resource
and resources should be found

cheers

Richard,

had a quick go at creating a route behaviour that can do what I set in
the syntax earlier, looks like it might be possible

On Sep 30, 4:45 pm, "Michael Klishin" <[EMAIL PROTECTED]>
wrote:
> 2008/9/30 [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
>
>
>
>
> > Hi,
>
> > One of the plugins that I always use for rails, is
> > resources_controller. It brings alot to building a restful web
> > application, make_resourceful bring the same goodness but I prefer
> > resources_controller
>
> > more information  
> > http://github.com/ianwhite/resources_controller/tree/master
>
> > In essence it adds "ActiveResource compliant controller for your your
> > RESTful models", your controller will know HOW to find a resource from
> > its enclosing resources etc
>
> > I find this approach very powerful and keeps those controllers DRY as
> > a bone.
>
> > So I am looking to add something similar to our favorite MERB,
>
> The idea of resource_controller, resource scopes (#object,
> #collection, #parent methods) is very good,
> there are definitely patterns in resource controllers we need to
> capture somehow.
>
> But implementation of resource controller is full of magic. With block
> and stuff you never know what scope you operate in.
> If you can address that somehow, it'd be great.
>
> I have my own home grown solution for this but it's not as "automagic"
> as resource_controller. I think I can extract it into a plugin soon.
> --
> MK
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to