Output some debug information
This commit is contained in:
parent
cf0b49932e
commit
32f57cc43c
@ -6,15 +6,20 @@ module Locomotive
|
|||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
included do
|
included do
|
||||||
|
puts "Including special bushido admin methods"
|
||||||
alias_method_chain :require_admin, :bushido
|
alias_method_chain :require_admin, :bushido
|
||||||
end
|
end
|
||||||
|
|
||||||
module InstanceMethods
|
module InstanceMethods
|
||||||
|
|
||||||
def require_admin_with_bushido
|
def require_admin_with_bushido
|
||||||
|
puts "requiring admin with bushido.."
|
||||||
|
puts "App claimed?"
|
||||||
if ::Locomotive.bushido_app_claimed?
|
if ::Locomotive.bushido_app_claimed?
|
||||||
|
|
||||||
require_admin_without_bushido
|
require_admin_without_bushido
|
||||||
else
|
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
|
# open back-office for everybody as long as the application is not claimed
|
||||||
sign_in(Account.order_by(:created_at).first)
|
sign_in(Account.order_by(:created_at).first)
|
||||||
end
|
end
|
||||||
@ -25,4 +30,4 @@ module Locomotive
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user