Sha256: fc2f2dbb27a318d7304d60f65ddf135ef15b81ba6fa8030fa3832d82fb981e8f

Contents?: true

Size: 511 Bytes

Versions: 1

Compression:

Stored size: 511 Bytes

Contents

require 'rails'

module MobileIntent
  class Railtie < ::Rails::Railtie
    initializer "mobile_intent.helpers" do
      ActiveSupport.on_load(:action_controller) do
        include MobileIntent::Helpers
      end

      ActiveSupport.on_load(:action_view) do
        include MobileIntent::Helpers
      end
    end

    config.before_configuration do
      if config.action_view.javascript_expansions
        config.action_view.javascript_expansions[:defaults] |= ['mobile_intent']
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mobile_intent-0.0.1 lib/mobile_intent/railtie.rb