Actually, even though I'm using the :identify option as part of the
hash to resources when defining my route, it seems it still generating
the routes using :id as my identifier.
(Just found that going to the / when using slice displays all your
routes)
* delete_post: /posts/:id/delete(.:format)
* edit_post: /posts/:id/edit(.:format)
* new_post: /posts/new(.:format)
* post: /posts/:id(.:format)
* posts: /posts(/index)(.:format)
On Nov 28, 10:38 am, Nik Radford <[EMAIL PROTECTED]> wrote:
> Actually, I'm just serving the slice with "slice" rather than "merb"
> as I'm still developing it, so it's not from with the hosting app.
>
> Just can't figure out what I'm doing wrong.
>
> Nik.
>
> On Nov 27, 11:20 pm, "Martin Gamsjaeger" <[EMAIL PROTECTED]> wrote:
>
> > Hey Nik,
>
> > Did you specify
>
> > Merb::Router.prepare do
> > slice(:myslice, :path => "test")
>
> > # other stuff omitted.
> > end
>
> > in your (main app's) router.rb ?
>
> > Obviously this assumes you're getting this error while accessing your
> > slice from within the hosting merb app ?
>
> > Also, be sure to check out:http://wiki.merbivore.com/howto/slice
>
> > cheers
> > snusnu
>
> > On Thu, Nov 27, 2008 at 8:09 PM, Nik Radford <[EMAIL PROTECTED]> wrote:
>
> > > Actually, further more, I'm having more of an issue.
>
> > > I've used slice_url for generating my URL but get a lovely generation
> > > error:
>
> > > merb : worker (port 4000) ~ Started request handling: Thu Nov 27
> > > 18:57:48 +0000 2008
> > > merb : worker (port 4000) ~ Params: {"format"=>nil, "action"=>"index",
> > > "controller"=>"blog_slice/posts"}
> > > merb : worker (port 4000) ~ Named route blog_slice_post could not be
> > > generated with {:slug=>"my-test-post"} -
> > > (Merb::Router::GenerationError)
>
> > > I've defined my route in setup_router method like so:
>
> > > scope.resources :posts, :identify => :slug
>
> > > Now, I'm getting the error when trying to use the url, /blog_slice/
> > > posts/my-test-post
>
> > > I was going to look on github at other slices to see how they handled
> > > url generation and routes using custom :identify settings, however
> > > it's down, so could someone help point me in the right direction?
>
> > > Thanks in advance,
>
> > > Nik
>
> > > On Nov 26, 9:05 pm, Nik Radford <[EMAIL PROTECTED]> wrote:
> > >> Hey guys,
>
> > >> Is there an equivalent of the URL generator method #resource that
> > >> works in slices? or should I just use #slice_url and the generated
> > >> named routes?
>
> > >> Cheers,
>
> > >> Nik
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---