Skip to content

Instantly share code, notes, and snippets.

@reshleman
reshleman / bug.rb
Created March 11, 2021 19:26
ActiveStorage bug w/ multiple `#attach` calls in a transaction
# frozen_string_literal: true
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Activate the gem you are reporting the issue against.
@reshleman
reshleman / keybase.md
Last active July 12, 2017 01:37
keybase.md

Keybase proof

I hereby claim:

  • I am reshleman on github.
  • I am reshleman (https://keybase.io/reshleman) on keybase.
  • I have a public key whose fingerprint is 87F7 3963 1E9E 3227 B91B 04EB 39A0 B973 C405 1280

To claim this, I am signing this object:

@reshleman
reshleman / irb
Last active August 29, 2015 14:16
Roo: NoMethodError: undefined method `each_pair' for nil:NilClass
irb(main):001:0> require "roo"
=> true
irb(main):002:0> require "roo/version"
=> true
irb(main):003:0> Roo::VERSION
=> "2.0.0"
irb(main):004:0> sheet = Roo::Spreadsheet.open("/Users/reshleman/Desktop/roo_error.csv", extension: "csv")
=> #<Roo::CSV:0x007feb3c97d5b8>
irb(main):005:0> sheet.parse(name: "name")
=> [{:name=>"name"}, {:name=>"Robert Eshleman"}]
@reshleman
reshleman / irb
Last active August 29, 2015 14:16
Roo: NoMethodError: undefined method `read_cells' for #<Roo::Excelx>
irb(main):001:0> require "roo"
=> true
irb(main):002:0> require "roo/version"
=> true
irb(main):003:0> Roo::VERSION
=> "2.0.0"
irb(main):004:0> sheet = Roo::Spreadsheet.open("/Users/reshleman/Desktop/roo_error.xlsx", extension: "xlsx")
=> {[1, 1]=>#<Roo::Excelx::Cell:0x007fe6b297fef0 @type=:string, @formula=nil, @excelx_type=:string, @excelx_value="0", @style=0, @value="name", @coordinate=#<Roo::Excelx::Cell::Coordinate:0x007fe6b297ff40 @row=1, @column=1>>, [2, 1]=>#<Roo::Excelx::Cell:0x007fe6b297f798 @type=:string, @formula=nil, @excelx_type=:string, @excelx_value="1", @style=0, @value="Robert Eshleman", @coordinate=#<Roo::Excelx::Cell::Coordinate:0x007fe6b297f7e8 @row=2, @column=1>>}
irb(main):005:0> sheet.parse(name: "name")
=> [{:name=>"name"}, {:name=>"Robert Eshleman"}]