Skip to content
Browse files

fixing more typos

  • Loading branch information...
1 parent 0f1b445 commit 61eb85793a7d004df2b00c8772c9cd60b5097d06 erik committed Jul 26, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/models/news_item.rb
View
6 app/models/news_item.rb
@@ -115,7 +115,7 @@ class NewsItem < ActiveRecord::Base
named_scope :featured, :conditions => {:feature => true}, :order => "news_items.created_at desc"
named_scope :unfunded, :conditions => "news_items.status NOT IN('accepted','funded','closed')"
named_scope :funded, :conditions => "news_items.status IN ('accepted','funded')"
- named_scope :almost_funded, :select => "news_items.*, if(news_items.status='active'), 1.0 - (news_items.current_funding / news_items.requested_amount), news_items.created_at) as sort_value", :order => "sort_value ASC"
+ named_scope :almost_funded, :select => "news_items.*, if(news_items.status='active', 1.0 - (news_items.current_funding / news_items.requested_amount), news_items.created_at) as sort_value", :order => "sort_value ASC"
named_scope :published, :conditions => {:status => 'published'}
named_scope :suggested, :conditions => "news_items.type='Tip' AND news_items.status NOT IN ('unapproved','draft','closed')"
named_scope :browsable, :include => :user, :conditions => "news_items.status != 'unapproved' and news_items.status != 'closed'"
@@ -147,7 +147,7 @@ class NewsItem < ActiveRecord::Base
}
named_scope :order_results, lambda { |type|
- return { :select => "news_items.*, if(news_items.status='active'), 1.0 - (news_items.current_funding / news_items.requested_amount), news_items.created_at) as sort_value" } if type=='almost-funded'
+ return { :select => "news_items.*, if(news_items.status='active', 1.0 - (news_items.current_funding / news_items.requested_amount), news_items.created_at) as sort_value" } if type=='almost-funded'
return { :order=>"news_items.created_at desc" }
}
@@ -211,7 +211,7 @@ def self.get_stories(page, topic_id, grouping_id, topic, selected_filter, curren
having_cache ["news_items_stories_", page, topic_id, grouping_id, topic, selected_filter, current_network, limit, @@per_page], {:expires_in => CACHE_TIMEOUT } do
unless limit
if selected_filter=='almost-funded'
- self.constrain_topic_id(topic_id).constrain_grouping_id(grouping_id).constrain_type(selected_filter).constrain_topic(topic).send(selected_filter.gsub('-','_')).order_results(selected_filter).browsable.by_network(current_network).paginate(:page => page, :select => "news_items.*, if(news_items.status='active', 1.0 - (news_items.current_funding / news_items.requested_amount), news_items.created_at) as sort_value")
+ self.constrain_topic_id(topic_id).constrain_grouping_id(grouping_id).constrain_type(selected_filter).constrain_topic(topic).send(selected_filter.gsub('-','_')).order_results(selected_filter).browsable.by_network(current_network).paginate(:page => page)
else
self.constrain_topic_id(topic_id).constrain_grouping_id(grouping_id).constrain_type(selected_filter).constrain_topic(topic).send(selected_filter.gsub('-','_')).order_results(selected_filter).browsable.by_network(current_network).paginate(:page => page)
end

0 comments on commit 61eb857

Please sign in to comment.
Something went wrong with that request. Please try again.