Sha256: 9afaaf3121c129d59eaa2186fcea1b16263697ba7cf7f8df2d5f55a7eaf7f7ec
Contents?: true
Size: 699 Bytes
Versions: 1
Compression:
Stored size: 699 Bytes
Contents
module SimpleForum class ForumsController < ApplicationController before_filter :find_forum, :except => [:index] def index @categories = SimpleForum::Category.default_order.includes({:forums => [{:recent_post => [:user, :topic]}, :moderators]}) respond_to :html end def show @forum.bang_recent_activity(authenticated_user) scope = @forum.topics.includes([:user, {:recent_post => :user}]) @topics = scope.respond_to?(:paginate) ? scope.paginate(:page => params[:page], :per_page => params[:per_page]) : scope.all respond_to :html end private def find_forum @forum = SimpleForum::Forum.find params[:id] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
simple_forum-0.0.2 | app/controllers/simple_forum/forums_controller.rb |