Sha256: ac25ded4d5e63cfd3c59d53505c0ca625af914bd4d3eea1be97b9bb048bb89ff

Contents?: true

Size: 482 Bytes

Versions: 3

Compression:

Stored size: 482 Bytes

Contents

require 'bigbro'

module BigBro

  if defined? Rails::Railtie
    class Railtie < Rails::Railtie
      initializer 'bigbro.insert_into_action_view' do
        ActiveSupport.on_load :action_view do
          BigBro::Railtie.insert
        end
      end
    end
  end

  class Railtie
    def self.insert
      ActionView::Base.instance_eval { include BigBro::Helpers }
      ActiveSupport::TestCase.instance_eval { include BigBro::TestHelpers } if Rails.env.test?
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bigbro-1.0.0 lib/bigbro/railtie.rb
bigbro-0.9.1 lib/bigbro/railtie.rb
bigbro-0.9 lib/bigbro/railtie.rb