Sha256: 7c6656861788fbc4b4d5349fda183fe1954f9fef13887772f225b41da0b0504d
Contents?: true
Size: 351 Bytes
Versions: 9
Compression:
Stored size: 351 Bytes
Contents
module BlogHelper # The base URL for this request, calculated by looking up the URL for the main # blog index page. def blog_base_url url_for(controller: '/articles', action: 'index').gsub(%r{/$}, '') end # Find the blog whose base_url matches the current location. def this_blog @blog ||= Blog.find_blog(blog_base_url) end end
Version data entries
9 entries across 9 versions & 1 rubygems