> In your blog, I saw somewhere that someone has provided a pastie about
> automatic resource type recognition from the controller name. Is there
> any particular reason for you to not applying that to the plugin?
At the time I though it was just a little too magical, but so many
people have requested it that I shall stick it in soon.
I haven't figured out yet whether to use the controller name, or the
route to introspect the resource
The syntax suggested by ChrisCruft, that I like is
resources_controller :for => :posts
where :for is optional
> Also is it not possible to automatically recognizing if the resource
> is singleton or not by using something like
It's a really nice idea, It might be a bit trickier than what you
suggest, because we don;t know if the resource is singular or plural
ie (this just illustrates the problem nicely)
resources_controller :for => :fish
Model.has_many :fish
resource_controller :for => :fish
Model.has_one :fish
In both of these cases, the model responds to :fish, but in one case
it's singleton, the other it's collection.
There might be another way to introspect this stuff though, I would
welcome you to figure it out. And I would certainly welcome some
spec'd patches of pull requests ;)
Cheers,
Ian
> the git faq
Once you get into git, you'll wonder how you did without it!
> When you get a chance, could you provide me your feedback on the last
> two questions I aksed in my previous response?
Was just in the middle of doing so :)
Cheers,
Ian