This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @deals1 = Deal.paginate(:page=>page, :per_page=>20, :order => 'created_at DESC', :conditions => ['source = ?', 'stashflip']) | |
| @deals2 = Deal.paginate(:page=>page, :per_page=>20, :order => 'created_at DESC', :conditions => ['source != ?', 'stashflip']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.get_breaking_news(min) | |
| doc = Hpricot.XML(open("http://bensbargains.net/rss.xml/")) { |f| Hpricot(f) } | |
| cutoff_time = Time.now - 60 * min | |
| breaking_news_array = [] | |
| breaking_news = (doc/"item").map do |item| | |
| temp_deal = Deal.new | |
| temp_deal.name = (item/"title").inner_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def self.get_breaking_news(min) | |
| doc = open("http://bensbargains.net/rss.xml/") { |f| Hpricot(f) } | |
| cutoff_time = Time.now - 60 * min | |
| breaking_news_array = [] | |
| breaking_news = (doc/"item").map do |item| | |
| temp_deal = Deal.new | |
| temp_deal.name = (item/"title").inner_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://bensbargains.net/rss.xml/0 | |
| temp_deal.name = (item/"link").inner_html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Number of Ratings | |
| <%= select_tag "num_ratings_weight", | |
| options_for_select([["Negligible", 1], | |
| ["Trivial", 2], | |
| ["Relevant", 3], | |
| ["Important", 4], | |
| ["Crucial", 5]], | |
| [ @num_ratings_weight ]), {:multiple => false} %> | |
| Average Ratings |