Class: Writefully::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Writefully::ApplicationController
show all
- Defined in:
- app/controllers/writefully/application_controller.rb
Instance Method Summary
collapse
Instance Method Details
#authenticate_wf_authorship! ⇒ Object
4
5
6
|
# File 'app/controllers/writefully/application_controller.rb', line 4
def authenticate_wf_authorship!
redirect_to signin_path unless wf_authorship_signed_in?
end
|
#set_flash(type, object: nil) ⇒ Object
12
13
14
15
16
17
18
|
# File 'app/controllers/writefully/application_controller.rb', line 12
def set_flash(type, object: nil)
flash[:namespace] = 'writefully'
flash[:from] = action_name
flash[:type] = type
flash[:object_type] = object.class.name
flash[:object_id] = object.id
end
|
#wf_authorship_signed_in? ⇒ Boolean
8
9
10
|
# File 'app/controllers/writefully/application_controller.rb', line 8
def wf_authorship_signed_in?
current_wf_authorship.present?
end
|