Sha256: a3c5f2b51f9ff86885f6e993f25dd567714a21ede4ef112d64a00a1364bdf770

Contents?: true

Size: 1.21 KB

Versions: 10

Compression:

Stored size: 1.21 KB

Contents

require 'hydra-access-controls'

module Hydra
  extend ActiveSupport::Autoload
  autoload :GlobalConfigurable
  extend GlobalConfigurable
  autoload :Controller
  autoload :ModelMethods
  autoload :RepositoryController
  autoload :Solr
  module ModelMixins
    # ModelMixins already loaded by hydra-access-controls
    autoload :CommonMetadata
    autoload :SolrDocumentExtension
  end
  autoload :Models
end

module HydraHead 
  require 'hydra-head/engine' if defined?(Rails)
  require 'hydra-head/routes'
  # If you put this in your application's routes.rb, it will add the Hydra Head routes to the app.
  # The hydra:head generator puts this in routes.rb for you by default.
  # See {HydraHead::Routes} for information about how to modify which routes are generated.
  # @example 
  #   # in config/routes.rb
  #   MyAppName::Application.routes.draw do
  #     Blacklight.add_routes(self)
  #     HydraHead.add_routes(self)
  #   end
  def self.add_routes(router, options = {})
    HydraHead::Routes.new(router, options).draw
  end
end

ActiveSupport.on_load(:after_initialize) do
  begin
    SolrDocument.use_extension Hydra::ModelMixins::SolrDocumentExtension
  rescue NameError
    logger.warn "Couldn't find SolrDocument"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hydra-core-6.4.2 lib/hydra-core.rb
hydra-core-6.4.1 lib/hydra-core.rb
hydra-core-6.4.0 lib/hydra-core.rb
hydra-core-6.4.0.rc5 lib/hydra-core.rb
hydra-core-6.4.0.rc4 lib/hydra-core.rb
hydra-core-6.4.0.rc3 lib/hydra-core.rb
hydra-core-6.4.0.rc2 lib/hydra-core.rb
hydra-core-6.4.0.rc1 lib/hydra-core.rb
hydra-core-6.4.0.pre2 lib/hydra-core.rb
hydra-core-6.4.0.pre1 lib/hydra-core.rb