Skip to content

Instantly share code, notes, and snippets.

View BDQ's full-sized avatar
💥

Brian Quinn BDQ

💥
View GitHub Profile
<!-- insert_after: 'h1' -->
<h2>These robots are awesome.</h2>
@import "compass";
@import "compass/typography";
@import "compass/css3";
@import url(http://fonts.googleapis.com/css?family=PT+Sans:400,700|PT+Sans+Narrow:400,700&subset=latin,cyrillic);
@import "forms";
@import "font-picker";
#spreeworks-editor {
Deface::Override.new(
:virtual_path => "spree/layouts/spree_application",
:set_attributes => "#content",
:attributes => {
'data-erb-class' => "alpha columns"
},
:name => "replace_omega_class_on_content_to_alpha"
)
#Super lazy:
alias v="mvim ."
alias rs="bundle exec rails server"
alias rsd="bundle exec rails server --debugger"
alias rsp="bundle exec rails server -e production"
alias rc="bundle exec rails console"
alias rd="bundle exec rails db"
alias r="bundle exec rake"
alias b="bundle"
alias be="bundle exec"
@BDQ
BDQ / bogo.rb
Created February 10, 2012 16:59 — forked from anonymous/bogo.rb
module Spree
class Calculator::Bogo < Calculator
preference :number_to_buy, :integer, :default => 1
preference :number_to_get, :integer, :default => 1
def self.description
"Buy One Get One"
end
def compute(order)
ArgumentError in Spree::UserSessionsController#new
interning empty string
Rails.root: /Users/briandquinn/pgtest
Application Trace | Framework Trace | Full Trace
/Users/briandquinn/Development/spree/core/app/models/spree/preference.rb:10:in `to_sym'
/Users/briandquinn/Development/spree/core/app/models/spree/preference.rb:10:in `value'
/Users/briandquinn/Development/spree/core/app/models/spree/preferences/store.rb:61:in `load_preferences'
# LandingPage used to support static pages, we've moved to a static
# event. This adds path to promotions then migrates the old LandingPage rules
class ContentVisitedEvent < ActiveRecord::Migration
# Removed Class for Migrations
class Spree::Promotion::Rules::LandingPage < Spree::PromotionRule
preference :path, :string
def eligible?(order, options = {})
true
end
== ContentVisitedEvent: migrating ============================================
-- add_column(:spree_activators, :path, :string)
(90.0ms) ALTER TABLE `spree_activators` ADD `path` varchar(255)
-> 0.0903s
Spree::Promotion::Rules::LandingPage Load (0.2ms) SELECT `spree_promotion_rules`.* FROM `spree_promotion_rules` WHERE `spree_promotion_rules`.`type` IN ('Spree::Promotion::Rules::LandingPage')
Spree::Promotion Load (0.4ms) SELECT `spree_activators`.* FROM `spree_activators` WHERE `spree_activators`.`type` IN ('Spree::Promotion') AND `spree_activators`.`id` = 19 LIMIT 1
rake aborted!
An error has occurred, all later migrations canceled:
undefined method `name' for nil:NilClass
[WARNING] Orphaned preference `api_secret` with value `abc` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `api_key` with value `123` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `provider` with value `facebook` for Spree::AuthenticationMethod with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `amount` with value `5` for Spree::Calculator with id of: 1, you should reset the preference value manually.
[WARNING] Orphaned preference `amount` with value `10` for Spree::Calculator with id of: 2, you should reset the preference value manually.
[WARNING] Orphaned preference `api_secret` with value `def` for Spree::AuthenticationMethod with id of: 2, you should reset the preference value manually.
[WARNING] Orphaned preference `api_key` with value `123` for Spree::AuthenticationMethod with id of: 2, you should reset the
class RailsdogRadio::Configuration < Spree::Preferences::Configuration
preference :homepage_groups, :default => ''
end
RailsdogRadio::Config = RailsdogRadio::Configuration.new
RailsdogRadio::Config.homepage_groups = 'Slingbox,Satellite Radios,Boomboxes,Accessories,Internet Radios,Vehicle Installation'