Method: EffectivePostsHelper#effective_post_path
- Defined in:
- app/helpers/effective_posts_helper.rb
#effective_post_path(post, opts = nil) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'app/helpers/effective_posts_helper.rb', line 18 def effective_post_path(post, opts = nil) category = post.category.to_s.downcase opts ||= {} if EffectivePosts.use_category_routes effective_posts.post_path(post, opts).sub('/posts', "/#{category}") else effective_posts.post_path(post, opts.merge(category: category)) end end |