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
(0.1ms) begin transaction | |
Spree::Adjustment Load (0.1ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_id" = 10 AND "spree_adjustments"."adjustable_type" = 'Spree::LineItem' | |
Spree::Order Load (0.1ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 3 LIMIT 1 | |
Spree::InventoryUnit Load (0.1ms) SELECT "spree_inventory_units".* FROM "spree_inventory_units" WHERE "spree_inventory_units"."order_id" = 3 | |
SQL (0.2ms) DELETE FROM "spree_line_items" WHERE "spree_line_items"."id" = ? [["id", 10]] | |
Spree::Adjustment Load (0.1ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_id" = 3 AND "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."originator_type" = 'Spree::TaxRate' AND "spree_adjustments"."adjustable_type" = 'Spree::Order' ORDER BY created_at ASC | |
Spree::LineItem Load (0.1ms) SELECT "spree_line_items".* FROM "spree_line_items" WHERE "spree_line_items"."o |
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
(0.1ms) begin transaction | |
Spree::Adjustment Load (0.1ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_id" = 9 AND "spree_adjustments"."adjustable_type" = 'Spree::LineItem' | |
Spree::Order Load (0.1ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 3 LIMIT 1 | |
Spree::InventoryUnit Load (0.1ms) SELECT "spree_inventory_units".* FROM "spree_inventory_units" WHERE "spree_inventory_units"."order_id" = 3 | |
SQL (0.3ms) DELETE FROM "spree_line_items" WHERE "spree_line_items"."id" = ? [["id", 9]] | |
(1.1ms) commit transaction | |
Spree::Adjustment Load (0.1ms) SELECT "spree_adjustments".* FROM "spree_adjustments" WHERE "spree_adjustments"."adjustable_id" = 3 AND "spree_adjustments"."adjustable_type" = 'Spree::Order' AND "spree_adjustments"."originator_type" = 'Spree::TaxRate' AND "spree_adjustments"."adjustable_type" = 'Spree::Order' ORDER BY created_at ASC | |
Spree::LineItem Load (0.1ms) SELECT "spree_line_items".* FROM "spree_line_items" W |
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
p = Spree::Product.find_by_name('Ruby on Rails Bag') | |
si = p.master.stock_items.first | |
si.update_attribute(:count_on_hand, 0) | |
sl = Spree::StockLocation.create(name: 'Second Location') | |
sl.stock_items.create(variant: p.master, count_on_hand: 10) | |
sl.active = true | |
sl.save! |
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
Generating dummy Rails application... | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
Setting up dummy database... | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
Generating dummy Rails application... | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
Setting up dummy database... | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
Generating dummy Rails application... | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 |
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
apt-get install ufw -y | |
ufw allow ssh/tcp | |
ufw allow 80 | |
ufw allow 443 | |
ufw logging on | |
ufw enable |
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
bundle exec foreman export bluepill --template=/data/bluepill/ /etc/init |
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
#order model decorator | |
Order.class_eval do | |
accepts_nested_attributes_for :line_items, :allow_destroy => true | |
def self.build_from_api(user, params) | |
order = create | |
params[:line_items_attributes].each do |line_item| | |
order.add_variant(Spree::Variant.find(line_item[:variant_id]), line_item[:quantity]) | |
end |
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
RET=0;until [[ $RET = 1 ]];do bundle exec rspec; RET="$?";sleep 1;done |
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
--- | |
CensusInfo: | |
CityName: | |
Country: | |
County: | |
CountyNum: | |
FinanceNumber: | |
FirmOrRecipient: | |
GeoLocationInfo: | |
IntelligentMailBarcodeKey: |
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
ActionView::Template::Error (undefined method `states' for nil:NilClass): | |
109: </p> | |
110: | |
111: <% if Spree::Config[:address_requires_state] %> | |
112: <p class="field" id="sstate"> | |
113: <% have_states = [email protected]_address.country.states.empty? %> | |
114: <%= ship_form.label :state, t(:state) %><span class="required">*</span><br><% state_elements = [ | |
115: ship_form.collection_select(:state_id, @order.ship_address.country.states, | |
/Users/briandquinn/.rvm/gems/ruby-1.9.3-p194/bundler/gems/spree-7df8f8d05580/core/app/views/spree/checkout/_address.html.erb:112:in `block in _c9611975a5f69558aac0f93cee17dc89' | |
actionpack (3.2.8) lib/action_view/helpers/capture_helper.rb:40:in `block in capture' |