Module: Cms::BlogHelper

Defined in:
app/helpers/cms/blog_helper.rb

Instance Method Summary collapse

Instance Method Details

#_blog_path(blog, route_name, route_params) ⇒ Object

We can’t call it ‘blog_path’ because that would conflict with the actual named route method if there’s a blog named “Blog”.



3
4
5
# File 'app/helpers/cms/blog_helper.rb', line 3

def _blog_path(blog, route_name, route_params)
  send("#{blog.name_for_path}_#{route_name}_path", route_params)
end

#_blog_post_path(blog_post) ⇒ Object



7
8
9
# File 'app/helpers/cms/blog_helper.rb', line 7

def _blog_post_path(blog_post)
  send("#{blog_post.route_name}_path", blog_post.route_params)
end