path_to_pickle does need a bit of love. I wrote it as a bit of an experiment.
Until it gets som elove, In your case, I would suggest using rails helpers + pickle to achieve the outcome (take path_to_pickle out of the loop)
something like:
when /admin #{capture_model}(?:'s)? page/
polymorphic_path [:admin, model!($1)]
Cheers,
Ian
> --
> You received this message because you are subscribed to the Google Groups "pickle" group.
> To post to this group, send email to pickle-...@googlegroups.com.
> To unsubscribe from this group, send email to pickle-cucumb...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pickle-cucumber?hl=en.
>
That works nicely.
> Really quite happy with this solution for now, but maybe in the future
> path_to_pickle should accept option[:namespace] ?
I plan to have path_to_pickle take a splat, if any of the args are symbols then they're just plonked into the polymorphic_path in place,
if they're strings, they are treated as pickle refs
Cheers,
Ian
Sounds good Ian, looking forward to it