I hereby claim:
- I am thekidcoder on github.
- I am thekidcoder (https://keybase.io/thekidcoder) on keybase.
- I have a public key ASBp94rsTbCK-x5jHwbMKWK1G386PIMDYBP2ztwWUeplvgo
To claim this, I am signing this object:
NoMethodError: undefined method `names' for nil:NilClass | |
…actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 116:in `block in find_routes' | |
.org/jruby/RubyArray.java:2518:in `map!'(undefined | |
…actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 113:in `find_routes' | |
…actionpack-4.2.9/lib/action_dispatch/journey/router.rb: 30:in `serve' | |
…ionpack-4.2.9/lib/action_dispatch/routing/route_set.rb: 817:in `call' | |
…/new_relic/agent/instrumentation/middleware_tracing.rb: 92:in `call' | |
…uby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb: 189:in `call!' | |
…uby/2.3.0/gems/omniauth-1.6.1/lib/omniauth/strategy.rb: 167:in `call' | |
…/new_relic/agent/instrumentation/middleware_tracing.rb: 92:in `call' |
I hereby claim:
To claim this, I am signing this object:
require 'benchmark' | |
result = Benchmark.bm(7) do |x| | |
x.report("Arrays of JSON") do | |
ActiveRecord::Base.connection.execute(%{select row_to_json(prompts) as json from prompts order by id asc;}).to_a.each do |prompt| | |
Oj.load(prompt['json']) | |
end | |
end | |
x.report("Single JSON Object") do | |
Oj.load(ActiveRecord::Base.connection.execute(%{ |
class Thinger | |
def run! | |
[:first_thing, :second_thing, :third_thing].map do |meth_name| | |
begin | |
self.method(meth_name).call | |
rescue => e | |
puts "There was a problem running: #{meth_name}" | |
next | |
end |
module Workflows | |
class Base | |
attr_reader :errors | |
def self.call(*args) | |
new(*args).call | |
end | |
def initialize(params) | |
@params = __params(params) |
_ __
/' `\ ( ~-_ /'
/' ) /`-__)
/' ____ ____ /' O. ,
/' _ /' ) /' )-- /' /' \ /
/' ' )/(___,/' /' /' /' /' \'
(_____,/'(________(___,/'(,/(_, (__ __/' \_
def email_text_field | |
return @email_text_field if @email_text_field | |
@email_text_field = UITextField.alloc.initWithFrame([[0, 0], [225, 40]]) | |
@email_text_field.center = CGPointMake(self.view.frame.size.width / 2, (self.view.frame.size.height / 2) - 60) | |
@email_text_field.placeholder = "[email protected]" | |
@email_text_field.borderStyle = UITextBorderStyleRoundedRect | |
@email_text_field | |
end |
def title | |
[:full_name, :first_name, :name].find {|meth| object.respond_to?(meth)}.tap {|meth| return object.method(meth).call} | |
end |
connection = ActiveRecord::Base.connection.raw_connection | |
manager = connection.connection.getLargeObjectAPI | |
oid = nil | |
#Write To LO | |
ActiveRecord::Base.transaction do | |
oid = manager.createLO | |
puts oid | |
path = java.nio.file.Paths.get("/Users/chris/Desktop/SIA - Arkansas/CORE - SIA - AR - Core Application.pdf") |
namespace :db do | |
namespace :binary do | |
desc "Dump current database to db/dumps" | |
task :dump => :environment do | |
#Get current info for git. | |
current_git_branch = `git rev-parse --abbrev-ref HEAD`.strip.gsub('/', '_') | |
current_git_hash = `git rev-parse HEAD`.strip | |
#Load DB config. | |
db_config = Rails.application.config.database_configuration[Rails.env] |