Output some debug information

This commit is contained in:
Sean Grove 2011-07-21 18:21:47 -07:00
parent cf0b49932e
commit 32f57cc43c
1 changed files with 6 additions and 1 deletions

View File

@ -6,15 +6,20 @@ module Locomotive
extend ActiveSupport::Concern
included do
puts "Including special bushido admin methods"
alias_method_chain :require_admin, :bushido
end
module InstanceMethods
def require_admin_with_bushido
puts "requiring admin with bushido.."
puts "App claimed?"
if ::Locomotive.bushido_app_claimed?
require_admin_without_bushido
else
puts "not claimed! signing in #{Account.order(:created_at).first.inspect}"
# open back-office for everybody as long as the application is not claimed
sign_in(Account.order_by(:created_at).first)
end