gluster-web-interface/app/controllers/plainpage_controller.rb

21 lines
567 B
Ruby
Raw Normal View History

2016-04-25 00:47:31 +00:00
class PlainpageController < ApplicationController
2016-08-20 06:41:37 +00:00
2016-08-19 15:22:36 +00:00
before_action :require_login
2016-04-25 00:47:31 +00:00
def index
2016-06-17 15:15:44 +00:00
flash[:success ] = "Success Flash Message: Welcome to GentellelaOnRails"
#other alternatives are
# flash[:warn ] = "Israel don't quite like warnings"
#flash[:danger ] = "Naomi let the dog out!"
2016-04-25 00:47:31 +00:00
end
2016-08-19 15:22:36 +00:00
# CHECK SIGNED IN FOR USING THE SERVICE
def require_login
unless user_signed_in?
flash[:danger] = "서비스 이용을 위한 로그인이 필요합니다."
redirect_to '/users/sign_in' # halts request cycle
end
end
2016-04-25 00:47:31 +00:00
end