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 update_quality(items) | |
items.each do |item| | |
if item.name != 'Aged Brie' && item.name != 'Backstage passes to a TAFKAL80ETC concert' | |
if item.quality > 0 | |
if item.name != 'Sulfuras, Hand of Ragnaros' | |
item.quality -= 1 | |
end | |
end | |
else | |
if item.quality < 50 |
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
17:52:53 web.1 | | |
17:52:53 web.1 | | |
17:52:53 web.1 | Started POST "/users/alert_rules" for 127.0.0.1 at 2012-06-18 17:52:53 -0500 | |
17:52:53 web.1 | [Barista] Compiling all scripts for barista | |
17:52:53 web.1 | [Barista] Compiling all coffeescripts | |
17:52:53 web.1 | [Barista] Copying all javascripts | |
17:52:53 web.1 | Processing by AlertRulesController#create as JS | |
17:52:53 web.1 | Parameters: {"utf8"=>"✓", "authenticity_token"=>"h2gEFkP1MbMRwdFAQKW89FPIn1f2NrR56o0IRBPYrnE=", "alert_rule"=>{"company_id"=>"114250", "user_id"=>"365", "alert_id"=>"1", "name"=>"test 5", "condition_type"=>"Above", "competitor"=>"Lowest price of all competitors", "competitor_id"=>"", "range"=>"", "range_type"=>"%", "product_condition"=>"0", "item_filter_attributes"=>{"company_id"=>"114250", "category_id"=>"74395", "brand"=>"3M", "price_min"=>"", "price_max"=>""}}, "search_item"=>{"competitor"=>"competitor"}, "competitors_query"=>"", "category_query"=>"", "brand_query"=>"", "commit"=>"Sa |
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
# Basic tagging system for mongoid documents. | |
# jpemberthy 2010 | |
# | |
# class User | |
# include Mongoid::Document | |
# include Mongoid::Document::Taggable | |
# end | |
# | |
# @user = User.new(:name => "Bobby") | |
# @user.tag_list = "awesome, slick, hefty" |