Notes posted by abstraktor

RSS feed
September 17, 2011
0 thanks

this works, but doesn't make sense

does it?

replace(klass.find(ids).index_by { |r| r.id }.values_at(*ids))

equals

replace(klass.find(ids))

I see no point in making it that complicated

April 6, 2011
0 thanks

the source is wrong!

in 3.0.5, the source code in line 15 looks like this:

respond_to?(:"#{k}=") ? send(:"#{k}=", v) : raise(UnknownAttributeError, "unknown attribute: #{k}")

whats wrong with apidock?