Sha256: 5c41293da1dd302186756f782f5102d0b03b5e646333afdae3fd2abffc12fdfe

Contents?: true

Size: 474 Bytes

Versions: 1

Compression:

Stored size: 474 Bytes

Contents

module Apress
  module Documentation
    module PreloadDocs
      extend ActiveSupport::Concern

      included do
        if (Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR == 2) || Rails::VERSION::MAJOR > 4
          before_action :load_docs
        else
          before_filter :load_docs
        end
      end

      def load_docs
        ActiveSupport.run_load_hooks(:documentation)
        Apress::Documentation.validate_dependencies!
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
apress-documentation-0.4.0 app/controllers/concerns/apress/documentation/preload_docs.rb