Suppose I have a blog with Rails 3 on my website, and that will be the only thing I have. I would like to use Rails to implement it, but I don't like the Rails URLs. I need the following URLs:
example.com/2012/05/10/foo
I don't need something like this that I know how to do this (with to_param):
example.com/entries/2012/05/10/foo
I still want to use helpers like
new_entry_path(@entry)
etc. Then I will have comments and you want to make them available as your own resources, for example
example.com/2012/05/10/foo/comments/5
and these URLs should also be accessible to regular helpers:
edit_entry_comment_path(@entry, @comment)
or something like that.
So, is it possible to get URLs without a controller name and use url helper methods? Just rewriting to_param will always just change the part after the controller name in the url. It would be very helpful to get some sample code.
Jeena source share