Sha256: 839eb2066668c10f73bbe69afea087ff7969279cf863237d2a11ce6a6792d45f

Contents?: true

Size: 425 Bytes

Versions: 48

Compression:

Stored size: 425 Bytes

Contents

require 'flapjack/utility'

module ErbViewHelper

  TEMPLATE_PATH = File.dirname(__FILE__) +
      '/../../lib/flapjack/gateways/web/views/'

  include Flapjack::Utility

  def render_erb(file, bind)
    erb = ERB.new(File.read(TEMPLATE_PATH + file))
    erb.result(bind)
  end

  def page_title(string)
    @page_title = string
  end

  def h(text)
    ERB::Util.h(text)
  end

  def u(text)
    ERB::Util.u(text)
  end

end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
flapjack-1.6.0 spec/support/erb_view_helper.rb
flapjack-1.6.0rc4 spec/support/erb_view_helper.rb
flapjack-1.6.0rc3 spec/support/erb_view_helper.rb
flapjack-1.6.0rc2 spec/support/erb_view_helper.rb
flapjack-1.6.0rc1 spec/support/erb_view_helper.rb
flapjack-1.5.0 spec/support/erb_view_helper.rb
flapjack-1.5.0rc1 spec/support/erb_view_helper.rb
flapjack-1.4.0 spec/support/erb_view_helper.rb
flapjack-1.4.0rc1 spec/support/erb_view_helper.rb
flapjack-1.3.0 spec/support/erb_view_helper.rb
flapjack-1.3.0rc3 spec/support/erb_view_helper.rb
flapjack-1.3.0rc2 spec/support/erb_view_helper.rb
flapjack-1.3.0rc1 spec/support/erb_view_helper.rb
flapjack-1.2.2 spec/support/erb_view_helper.rb
flapjack-1.2.1 spec/support/erb_view_helper.rb
flapjack-1.2.1rc3 spec/support/erb_view_helper.rb
flapjack-1.2.1rc2 spec/support/erb_view_helper.rb
flapjack-1.2.1rc1 spec/support/erb_view_helper.rb
flapjack-1.2.0 spec/support/erb_view_helper.rb
flapjack-0.9.6 spec/support/erb_view_helper.rb