search for: post_category_name

Displaying 1 result from an estimated 1 matches for "post_category_name".

2010 Apr 22
0
How to automatically set params based on passed object when generating a route?
Hi, having i.e. a post model that has many categories - is it possible for member routes like i.e. post_path(post) to generate path like "/ posts/:post_category_name/:post_id" without manually passing the category param? Does anyone know if there''s a gem or if I can simply override the post_url method to automatically set category from post object? The best I could get right now is post_path(post.category, post), but while it doesn''t loo...