Skip to content

Instantly share code, notes, and snippets.

🍡 ☕️ 🍰 ☕️ ☕️ ☕️ ☕️

akira yamada arika

🍡 ☕️ 🍰 ☕️ ☕️ ☕️ ☕️
Block or report user

Report or block arika

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
eileencodes / gist:5b0a2fe011dcff6203fe
Last active Nov 11, 2019
CollectionProxy `delete_all` and `destroy_all` behavior by dependency AND association type AND strategy
View gist:5b0a2fe011dcff6203fe

Testing behavior of a CollectionProxy based on :dependent option, delete method used and assocation type (:has_many vs :has_many :through)

:has_many association

class Category < ActiveRecord::Base
	has_many :contacts, through: :categorizations
	has_many :categorizations, dependent: DEPENDENT
postmodern / gix_require_benchmark.rb
Created Mar 10, 2011
Benchmark each require in your Ruby code.
View gix_require_benchmark.rb
require 'rubygems'
require 'rbtree'
class Req
attr_accessor :path, :time, :requires, :exception
def initialize(path)
@path = path
@requires = []
@time = 0
You can’t perform that action at this time.