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

Version Path
publify_core-9.1.0 app/helpers/blog_helper.rb
publify_core-9.0.1 app/helpers/blog_helper.rb
publify_core-9.0.0 app/helpers/blog_helper.rb
publify_core-9.0.0.pre6 app/helpers/blog_helper.rb
publify_core-9.0.0.pre5 app/helpers/blog_helper.rb
publify_core-9.0.0.pre4 app/helpers/blog_helper.rb
publify_core-9.0.0.pre3 app/helpers/blog_helper.rb
publify_core-9.0.0.pre2 app/helpers/blog_helper.rb
publify_core-9.0.0.pre1 app/helpers/blog_helper.rb