lib/mediashelf/active_fedora_helper.rb in hydra-head-3.0.0pre3 vs lib/mediashelf/active_fedora_helper.rb in hydra-head-3.0.0pre4

- old
+ new

@@ -13,10 +13,11 @@ # super.merge :per_page=>10 # end # # end # +require 'active_fedora/version' module MediaShelf module ActiveFedoraHelper def retrieve_af_model(class_name, opts={}) if !class_name.nil? @@ -40,10 +41,15 @@ end private def require_fedora - Fedora::Repository.register(ActiveFedora.fedora_config[:url], session[:user]) + if ActiveFedora::VERSION < "3.1.0" + + Fedora::Repository.register(ActiveFedora.fedora_config[:url], session[:user]) + else + ActiveSupport::Deprecation.warn("ActiveFedoraHelper.require_fedora has been deprecated and no longer has any effect.") + end return true end def require_solr ActiveFedora::SolrService.register(ActiveFedora.solr_config[:url])