Method: EffectivePostsHelper#effective_post_category_path

Defined in:
app/helpers/effective_posts_helper.rb

#effective_post_category_path(category, opts = nil) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
# File 'app/helpers/effective_posts_helper.rb', line 29

def (category, opts = nil)
  return effective_posts.posts_path unless category.present?

  category = category.to_s.downcase
  opts ||= {}

  if EffectivePosts.use_category_routes
    "/#{category}"
  else
    effective_posts.posts_path(opts.merge(category: category))
  end
end