Class: ReaderActionController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ReaderActionController
show all
- Includes:
- Radiant::Pagination::Controller
- Defined in:
- app/controllers/reader_action_controller.rb
Instance Method Summary
collapse
Instance Method Details
#default_welcome_url(reader = nil) ⇒ Object
34
35
36
|
# File 'app/controllers/reader_action_controller.rb', line 34
def default_welcome_url(reader=nil)
(reader && reader.home_url) || reader_dashboard_url
end
|
#logged_in? ⇒ Boolean
16
17
18
|
# File 'app/controllers/reader_action_controller.rb', line 16
def logged_in?
true if current_reader
end
|
#logged_in_admin? ⇒ Boolean
24
25
26
|
# File 'app/controllers/reader_action_controller.rb', line 24
def logged_in_admin?
true if logged_in_user? && current_reader.admin?
end
|
#logged_in_user? ⇒ Boolean
20
21
22
|
# File 'app/controllers/reader_action_controller.rb', line 20
def logged_in_user?
true if logged_in? && current_reader.is_user?
end
|
#permission_denied ⇒ Object
28
29
30
31
32
|
# File 'app/controllers/reader_action_controller.rb', line 28
def permission_denied
session[:return_to] ||= request.referer
@title = flash[:error] || t('reader_extension.permission_denied')
render
end
|