1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00
danbarberphoto/app/controllers/admin/sessions_controller.rb
2015-10-14 12:30:00 +01:00

15 lines
351 B
Ruby

module Admin
class SessionsController < ::Devise::SessionsController
layout 'admin/layouts/login'
before_filter :check_https
private
def check_https
secure_link = url_for(protocol: 'https')
flash[:alert] = I18n.t('insecure_alert', secure_link: secure_link).html_safe unless request.scheme == 'https'
end
end
end