Class: TopicsController

Inherits:
ForumBaseController show all
Defined in:
app/controllers/topics_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
# File 'app/controllers/topics_controller.rb', line 3

def index
  @topics = Topic.visible_to(current_reader).bydate.paginate(pagination_parameters)
  render_page_or_feed
end

#showObject



8
9
10
11
12
13
# File 'app/controllers/topics_controller.rb', line 8

def show
  @topic = Topic.visible_to(current_reader).find(params[:id])
  @forum = @topic.forum
  @posts = @topic.replies.paginate(pagination_parameters)
  render_page_or_feed
end