demarches-normaliennes/app/controllers/administrateurs/sessions_controller.rb

23 lines
440 B
Ruby
Raw Normal View History

class Administrateurs::SessionsController < Sessions::SessionsController
2017-06-20 14:39:56 +02:00
layout "new_application"
2016-02-19 17:27:14 +01:00
def demo
return redirect_to root_path if Rails.env.production?
2017-01-03 10:40:09 +01:00
@user = User.new(email: DemoEmails[:admin], password: 'password')
render 'users/sessions/new'
2016-02-19 17:27:14 +01:00
end
def new
2017-01-03 10:43:04 +01:00
redirect_to new_user_session_path
end
def create
super
end
def after_sign_in_path_for(resource)
2015-10-26 15:54:20 +01:00
admin_procedures_path
end
end