Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,10 +31,10 @@ def show_page | |
private | ||
def batch_page_status_refresh | ||
@changed_pages = [] | ||
@pages = Page.find(:all, :conditions => {:status_id => 90}) | ||
@pages = Page.find(:all, :conditions => {:status_id => Status[:scheduled]}) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jlong
Member
|
||
@pages.each do |page| | ||
if page.published_at <= Time.now | ||
page.status_id = 100 | ||
page.status_id = Status[:published] | ||
page.save | ||
@changed_pages << page.id | ||
end | ||
|
Can we start to discourage the use of find(:all) in our core code? Its past time we had some named scopes anyway.