Sha256: 5bcbcecc6a6238c6e137d563d0cabf99263d979692a63b2e2eb9ce3a132a1a30

Contents?: true

Size: 343 Bytes

Versions: 6

Compression:

Stored size: 343 Bytes

Contents

module BootstrapExamples::ApplicationHelper

  def bvh_app_home_link
    root_path
  rescue NameError
    '/'
  end
  
  def bvh_show_source(path)
    erb = IO.read(bvh_view_dir.join("#{path}.html.erb"))
    content_tag(:pre, erb)
  end
  
  private
  
  def bvh_view_dir
    BootstrapViewHelpers::Engine.root.join('app/views')
  end
  
end
  

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bootstrap-view-helpers-0.0.14 app/helpers/bootstrap_examples/application_helper.rb
bootstrap-view-helpers-0.0.13 app/helpers/bootstrap_examples/application_helper.rb
bootstrap-view-helpers-0.0.12 app/helpers/bootstrap_examples/application_helper.rb
bootstrap-view-helpers-0.0.11 app/helpers/bootstrap_examples/application_helper.rb
bootstrap-view-helpers-0.0.10 app/helpers/bootstrap_examples/application_helper.rb
bootstrap-view-helpers-0.0.9 app/helpers/bootstrap_examples/application_helper.rb