Module | Erubis::Helpers::RailsHelper
In: | erubis/helpers/rails_helper.rb

helper module for Ruby on Rails

howto:

1. add the folliwng code in your ‘config/environment.rb‘

         require 'erubis/helpers/rails_helper'
         #Erubis::Helpers::RailsHelper.engine_class = Erubis::Eruby # or Erubis::FastEruby
         #Erubis::Helpers::RailsHelper.init_properties = {}
         #Erubis::Helpers::RailsHelper.show_src = false       # set true for debugging
         #Erubis::Helpers::RailsHelper.preprocessing = true   # set true to enable preprocessing

2. restart web server.

if Erubis::Helper::Rails.show_src is true, Erubis prints converted Ruby code into log file (‘log/development.log’ or so). if false, it doesn‘t. if nil, Erubis prints converted Ruby code if ENV[‘RAILS_ENV’] == ‘development’.

### Methods

engine_class engine_class= init_properties init_properties= preprocessing preprocessing= show_src show_src=

### Classes and Modules

Module Erubis::Helpers::RailsHelper::TemplateConverter

### Public Class methods

engine_class()

@@engine_class = ::Erubis::FastEruby

[Source]

    # File erubis/helpers/rails_helper.rb, line 47
          def self.engine_class
            @@engine_class
          end

engine_class=(klass)

[Source]

    # File erubis/helpers/rails_helper.rb, line 50
          def self.engine_class=(klass)
            @@engine_class = klass
          end

init_properties()

[Source]

    # File erubis/helpers/rails_helper.rb, line 56
          def self.init_properties
            @@init_properties
          end

init_properties=(hash)

[Source]

    # File erubis/helpers/rails_helper.rb, line 59
          def self.init_properties=(hash)
            @@init_properties = hash
          end

preprocessing()

[Source]

    # File erubis/helpers/rails_helper.rb, line 74
          def self.preprocessing
            @@preprocessing
          end

preprocessing=(flag)

[Source]

    # File erubis/helpers/rails_helper.rb, line 77
          def self.preprocessing=(flag)
            @@preprocessing = flag
          end

show_src()

[Source]

    # File erubis/helpers/rails_helper.rb, line 65
          def self.show_src
            @@show_src
          end

show_src=(flag)

[Source]

    # File erubis/helpers/rails_helper.rb, line 68
          def self.show_src=(flag)
            @@show_src = flag
          end

[Validate]