update deprecated finder method
This commit is contained in:
parent
7da4d294d9
commit
4cb1c95793
@ -35,24 +35,20 @@ class StatusController < ApplicationController
|
||||
# display only 1 day by default
|
||||
params[:days] = 1 if !params[:days]
|
||||
|
||||
|
||||
# set limits
|
||||
limit = (request.format == 'csv') ? 1000000 : 8000
|
||||
limit = params[:results].to_i if (params[:results] and params[:results].to_i < 8000)
|
||||
|
||||
# get feed based on conditions
|
||||
@feeds = @channel.feeds.find(
|
||||
:all,
|
||||
:conditions => { :created_at => get_date_range(params) },
|
||||
:select => [:created_at, :entry_id, :status],
|
||||
:order => 'created_at desc',
|
||||
:limit => limit
|
||||
)
|
||||
@feeds = @channel.feeds
|
||||
.where(:created_at => get_date_range(params))
|
||||
.select([:created_at, :entry_id, :status])
|
||||
.order('created_at desc')
|
||||
.limit(limit)
|
||||
|
||||
# sort properly
|
||||
@feeds.reverse!
|
||||
|
||||
|
||||
# set output correctly
|
||||
if request.format == 'xml'
|
||||
@channel_output = @channel.to_xml(channel_options).sub('</channel>', '').strip
|
||||
@ -156,3 +152,4 @@ class StatusController < ApplicationController
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user