Skip to content

Instantly share code, notes, and snippets.

View clarkcutler's full-sized avatar

Clark Cutler clarkcutler

  • Carbon Five
  • San Francisco, CA
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@clarkcutler
clarkcutler / stack trace
Last active April 10, 2017 23:19
Stack trace for spree/spree issue "500 error for blank "Master Price *" in product create/update"
# Extracted Source
def to_d
BigDecimal(self)
end
# Full Trace
~/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/bigdecimal/util.rb:61:in `BigDecimal'
~/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/bigdecimal/util.rb:61:in `to_d'
~/Projects/spree/core/lib/spree/localized_number.rb:18:in `parse'
~/Projects/spree/core/app/models/spree/price.rb:28:in `amount='
@clarkcutler
clarkcutler / Gemfile.lock
Created April 10, 2017 23:08
Gemfile.lock for spree/spree issue "500 error for blank "Master Price *" in product create/update"
GIT
remote: https://github.com/spree/spree_auth_devise.git
revision: 31b705dad038b0eea914930955c6ac61d70ee760
branch: master
specs:
spree_auth_devise (3.2.0.beta)
devise (~> 4.0.0)
devise-encryptable (= 0.1.2)
spree_core (>= 3.1.0, < 4.0)
@clarkcutler
clarkcutler / Gemfile
Created April 10, 2017 23:08
Gemfile for spree/spree issue "500 error for blank "Master Price *" in product create/update"
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.0.2'
@clarkcutler
clarkcutler / three.md
Last active August 29, 2015 14:04 — forked from laser/three.md

CHALLENGE #3: HIGHER-ORDER FUNCTIONS

  1. implement a function "foldFromRight" which takes:
  • a function with two parameters (a "binary function")
  • a starting value (the accumulator)
  • a list of values to reduce into a single value

The behavior of your foldFromRight function will be similar to "reduce" in JavaScript and Ruby - except for the fact that it will move from the end of the list to the beginning (instead of from the beginning to the end).