lib/balrog/helpers.rb in balrog-1.0.0 vs lib/balrog/helpers.rb in balrog-1.1.0

- old
+ new

@@ -1,8 +1,12 @@ +require_relative 'guard' + # Helpers methods are made available in all controllers by the code in engine.rb. module Balrog::Helpers + include Balrog::Guard + def authenticate_with_balrog! - unless session[:balrog] == 'authenticated' - render 'balrog/gate', layout: nil + unless authenticated?(session[:balrog]) + render 'balrog/gate', layout: 'balrog' end end end