Sha256: ac5286338ba369d27929498c7c7a5de154559addd7e80caa908a8e2ec2f6e1c4

Contents?: true

Size: 889 Bytes

Versions: 9

Compression:

Stored size: 889 Bytes

Contents

module SharingTags
  # = Sharing Tags Railtie
  class Railtie < Rails::Railtie # :nodoc:
    generators do
      require "generators/sharing_tags/install/install_generator"
    end

    initializer "sharing_tags.configure_view_controller" do
      ActiveSupport.on_load :action_view do
        include SharingTags::ActionView::MetaHelper
        include SharingTags::ActionView::ButtonHelper

        # @note: load AssetHelper after sprockets helper
        include Sprockets::Rails::Helper if defined?(Sprockets::Rails::Helper) && !include?(Sprockets::Rails::Helper)
        include SharingTags::ActionView::AssetHelper
      end

      ActiveSupport.on_load :action_controller do
        include SharingTags::ActionController::Helpers
        include SharingTags::ActionController::Filters
      end
    end

    console do
      ApplicationController.new.view_context
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sharing_tags-0.0.18 lib/sharing_tags/railtie.rb
sharing_tags-0.0.17 lib/sharing_tags/railtie.rb
sharing_tags-0.0.16 lib/sharing_tags/railtie.rb
sharing_tags-0.0.15 lib/sharing_tags/railtie.rb
sharing_tags-0.0.14 lib/sharing_tags/railtie.rb
sharing_tags-0.0.13 lib/sharing_tags/railtie.rb
sharing_tags-0.0.12 lib/sharing_tags/railtie.rb
sharing_tags-0.0.11 lib/sharing_tags/railtie.rb
sharing_tags-0.0.10 lib/sharing_tags/railtie.rb