Skip to content

Instantly share code, notes, and snippets.

View k-rudy's full-sized avatar

Konstantin Rudy k-rudy

  • Intellum
  • Gdańsk, Poland
View GitHub Profile
@k-rudy
k-rudy / attributes.rb
Last active August 29, 2018 08:27
attributes
Attributes::Extract.(params, schema: schema)
@k-rudy
k-rudy / test.rb
Created May 12, 2015 20:18
Monkey patching demo
require 'redis'
class Redis
module Connection
class Ruby
def self.restus
puts 'non overriden'
end
def self.connect(config)
@k-rudy
k-rudy / multi-parameter_attributes_spec.rb
Last active September 6, 2016 13:02
Multiparameter Attributes support in Mongoid 4 (Rails 4.0.1) Code is taken from https://github.com/mongoid/mongoid/issues/2954 with minor amendments to work with Rails 4.0.1
# This class is needed since Mongoid doesn't support Multi-parameter
# attributes in version 4.0 before it's moved to active model in rails 4
#
# https://github.com/mongoid/mongoid/issues/2954
#
require "spec_helper"
describe Mongoid::MultiParameterAttributes do