Sha256: b9e79d30015f3eda1ad6b889cfa66731f7dcf5bc6183c774a5fc1fcede5d4974

Contents?: true

Size: 916 Bytes

Versions: 4

Compression:

Stored size: 916 Bytes

Contents

module SharingTags
  class Railtie < Rails::Railtie

    # config.eager_load_namespaces << SharingTags

    generators do
      require "generators/sharing_tags/install/install_generator"
    end

    # rake_tasks do
    #   load "rspec/rails/tasks/rspec.rake"
    # end

    initializer "sharing_tags.configure_view_controller" do |app|
      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

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sharing_tags-0.0.8 lib/sharing_tags/railtie.rb
sharing_tags-0.0.7 lib/sharing_tags/railtie.rb
sharing_tags-0.0.6 lib/sharing_tags/railtie.rb
sharing_tags-0.0.5 lib/sharing_tags/railtie.rb