# - 'assignees'
#
def index
- reviews=select_authorized(:user, Review.search(params), :project)
+ reviews=select_authorized(:user, Review.search(params.merge({'limit' => 500})), :project)
render_reviews(reviews, params[:output] == 'HTML')
end
def self.search(options={})
conditions=[]
values={}
+ no_need_for_db_request = false
if options['id'].present?
conditions << 'id=:id'
end
found_reviews = []
- found_reviews = Review.find(:all, :include => ['review_comments', 'project', 'assignee', 'resource', 'user'], :conditions => [conditions.join(' AND '), values], :order => sort, :limit => 200) unless no_need_for_db_request
+ found_reviews = Review.find(:all, :include => ['review_comments', 'project', 'assignee', 'resource', 'user'], :conditions => [conditions.join(' AND '), values], :order => sort, :limit => options['limit']) unless no_need_for_db_request
found_reviews
end