diff --git a/app/controllers/mercury_controller.rb b/app/controllers/mercury_controller.rb index 447ccf9d..c97def4e 100644 --- a/app/controllers/mercury_controller.rb +++ b/app/controllers/mercury_controller.rb @@ -2,11 +2,19 @@ class MercuryController < ActionController::Base include ::Mercury::Authentication protect_from_forgery - before_filter :authenticate, :only => :edit layout false + if Rails::VERSION::MAJOR <= 4 + before_filter :authenticate, :only => :edit + else + before_action :authenticate, :only => :edit + end def edit - render :text => '', :layout => 'mercury' + if Rails::VERSION::MAJOR <= 4 + render :text => '', :layout => 'mercury' + else + render :layout => 'mercury' + end end def resource