Sometimes we want to have option to enable/disable some git hooks. We can create if for each, but we should […]

def transform_string(string) transformed_string = string.dup char_positions = [] (‘A’..’Z’).each do |char| break if char_positions.size >=2 position = string.index(char) next if […]

I’ve run across Rails code like the following several times: def emails # force emails into an array if not […]

I’ve been programming with C# for >90% of my professional career. It was the second language I learned (the first […]

No se porque sucede, pero cuando instalo MacRuby con RVM me saca un error respecto a la libreria MacRuby.framework Para […]

ActiveSupport::JSON.method(:encode).source_location [“/Users/me/Work/railsproject/bundle/jruby/1.9/gems/activesupport-3.2.13/lib/active_support/json/encoding.rb”, 30]

irb: foo = false || true ===> true irb: foo ===> true irb: foo = false or true ===> true […]

Using Active Admin? You are going to love this: Just the facts [gender neutral honorific] Put this in […]

Paperclip 4.x includes automatic file content type detection: If you want to include detection of newer Microsoft Office and […]

Differences module MM def test puts “test” end end class CC def call_test test end end MM.test #=> NoMethodError […]