Monthly Archives: September 2008

Isn’t newest autotest (from ZenTest 3.10.0) working with RSpec for you? Like many times before..? Use the autospec command! I didn’t even know this existed..

From the HyperactiveResource source code:

#This means someone has set blah_ids = [1,2,3]
#Instead of being retarded like ActiveResource normally is,
#Let’s turn this into “1,2,3″

Funny.

“There is one special requirement for evoking a sub-routine within a tell block: it must be preceded by the word “my“. Doing so identifies to the script that the sub-routine name belongs to the script and not to the object targeted by the tell block.”

Who is this designed for? Not for me; I can’t get into the syntax :/

The job has been done for you in Facets:

>> require 'facets'
>> ['ab', 'cd', 'abc'].uniq_by {|i| i.length}
=> ["ab", "abc"]

And similar errors. An application that has old Rails “frozen” in vendor/rails stopped working when you did gem clean? The problem might be that action_web_service (which is not in vendor/rails) pulls in new versions of libraries from currently installed gems. What you need to do is put (uncomment) the following in Rails::Initializer.run do |config| in environment.rb:

  config.frameworks -= [ :action_web_service]

This was rather a note to self; did it help you?