Class: Formol::ForumsController
Instance Method Summary
collapse
#last_page_forum_topic_path, #paginated_forum_topic_post_path, #per_page, #topic_last_page_number, #topic_post_page_number
Instance Method Details
#mark_as_read ⇒ Object
13
14
15
16
17
18
19
|
# File 'app/controllers/formol/forums_controller.rb', line 13
def mark_as_read
formol_authorize!(current_formol_user, :read_forum)
forum.mark_as_read(current_formol_user) if current_formol_user
respond_with(forum)
end
|
#show ⇒ Object
5
6
7
8
9
10
11
|
# File 'app/controllers/formol/forums_controller.rb', line 5
def show
formol_authorize!(current_formol_user, :read_forum)
@topics = forum.topics.ready_for_listing.page(params[:page]).per_page(per_page)
respond_with(forum)
end
|