This file contains 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
cwoodcox in ~/Projects with 1.9.3 on master λ gsay "party rock is in the house tonight everybody just have a good time and we gonna make you lose your mind" | |
/Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find multi_json-1.3.6 in any of the sources (Bundler::GemNotFound) | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!' | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize' | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs' | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs' | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.3/lib/rubygems-bundler/noexec.rb:41:in `candidate?' | |
from /Users/cwoodcox/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler |
This file contains 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
# This: | |
render partial: 'posts/post_preview', collection: @posts, as: :post | |
# Is not the same as this: | |
render 'posts/post_preview', collection: @posts, as: :post | |
# Even though this: | |
render 'posts/post_preview', collection: @posts | |
# Behaves exactly as it should. |
This file contains 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
stirng.c:98:3: error: no matching function for call to 'rb_define_module_function' | |
rb_define_module_function(stirng_module, "distance", stirng_distance, 2); | |
^~~~~~~~~~~~~~~~~~~~~~~~~ | |
/Users/cwoodcox/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:1101:6: note: candidate function not viable: no known conversion from 'VALUE (VALUE, VALUE)' to 'VALUE (*)(...)' for 3rd argument; | |
void rb_define_module_function(VALUE,const char*,VALUE(*)(ANYARGS),int); | |
^ |
This file contains 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
Interval Since Last Panic Report: 2077764 sec | |
Panics Since Last Report: 1 | |
Anonymous UUID: 6DCCF5D8-CE06-4466-9DE9-A9923CD67A2B | |
Thu Jul 12 09:35:25 2012 | |
panic(cpu 0 caller 0xffffff80002c473a): Kernel trap at 0xffffff80002ab8be, type 13=general protection, registers: | |
CR0: 0x000000008001003b, CR2: 0x0000000003737e7c, CR3: 0x0000000023da5021, CR4: 0x00000000000606e0 | |
RAX: 0x968b848208010000, RBX: 0xffffff800ee2a0f0, RCX: 0xffffff800a0e7e40, RDX: 0xffffff800c935a28 | |
RSP: 0xffffff807eff39d0, RBP: 0xffffff807eff3a60, RSI: 0x0000000105c79000, RDI: 0xffffff800c935a28 | |
R8: 0xffffff80008bde08, R9: 0xffffff80008bde10, R10: 0xfffffe8142276498, R11: 0x00080000001119ab |
This file contains 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
class RoutesTest < ActionDispatch::IntegrationTest | |
def setup | |
@routes = Shim::Engine.routes | |
end | |
def test_index_route | |
assert_routing "", { :controller => "shim/pages", :action => "show", :id => "index" } | |
end | |
def test_page_route |
This file contains 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
Shim::Engine.routes.draw do | |
match "*id" => 'pages#show', :as => :page, :format => false | |
root :to => 'pages#show', :id => "index" | |
end |
This file contains 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
$ -> | |
$("#nav-main li").click -> | |
toExpand = $ $(this).data("expand") | |
$(".nav-sub").hide() | |
toExpand.show() | |
if $(this).hasClass("open") | |
$("#nav-sub-group").height(0) unless $(this).siblings().hasClass("open") | |
$("#nav-main li").removeClass("open") |
This file contains 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
module Stuff | |
def some_method | |
# stuff... | |
end | |
rescue Exception => ex | |
# Deal with ex here... | |
end |
This file contains 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
require 'json' | |
require 'csv' | |
require 'pry' | |
data = JSON.parse(DATA.read) | |
CSV.open 'data.csv', 'wb' do |csv| | |
mapping = { | |
"name" => "custom_field_1", | |
"email" => "custom_field_4", | |
"phone" => "custom_field_3", |
This file contains 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
if params[:q] | |
attrs = { | |
id: 0, | |
business_partner_id: 1, | |
street_number: params[:q]['near_filter(1)'], | |
city: params[:q]['near_filter(2)'], | |
state: params[:q]['near_filter(3)'], | |
zip_code: params[:q]['near_filter(4)'], | |
icon_name: "home" | |
} |