Hi,
I'm trying to make gallery-slice. It would be not only offer gallery
feature, but make avaible to create some nested resource gallery. And
I have serious problem with routes.
First:
Merb::Router.prepare do |l|
l.resources :foos do |foo|
foo.slice(:gallery_slice, :name_prefix => nil, :path => "")
end
l.slice(:gallery_slice, :name_prefix => nil, :path => "")
end
It works, ie /foos/:foo_id/galleries shows action index from galleries
form slice. But, links from template are /galleries/... no, /
foos/:foo_id/galleries.
If I change routes to:
l.slice(:gallery_slice, :name_prefix => nil, :path => "foo"),
slice generate links /foo/galleries/... (i found it in spec), but I
cant use routes like this:
l.slice(:gallery_slice, :name_prefix => nil, :path => "foos/:foo_id"),
it generates an error, I think in slice_url helper, :foo_id is not
recognized.
How to setup routes well?
Sławosz
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---