restrict min level constraints for forum topics to mod+admin and restrict options based on current user's level. check privileges for visiblity in forum posts and topics. deprecate serializable_hash (undocumented, internal) for as_json, refactor to use hidden_attributes and method_attributes #2658
This commit is contained in:
@@ -20,7 +20,11 @@ class ForumTopicsController < ApplicationController
|
||||
def index
|
||||
@query = ForumTopic.active.search(params[:search])
|
||||
@forum_topics = @query.includes([:creator, :updater]).order("is_sticky DESC, updated_at DESC").paginate(params[:page], :limit => per_page, :search_count => params[:search])
|
||||
|
||||
respond_with(@forum_topics) do |format|
|
||||
format.json do
|
||||
render :json => @forum_topics.to_json
|
||||
end
|
||||
format.xml do
|
||||
render :xml => @forum_topics.to_xml(:root => "forum-topics")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user