When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...
Writing ruby methods that accept both optional and keyword arguments is dangerous and should be avoided. This confusing behavior will...
Starting with Rails 4.0, when you get an exception reported via the ExceptionNotification gem, you will only see a very...
Starting with Ruby 1.9, most #each methods can be called without a block, and will return an enumerator. This is...
To safely transport an arbitrary string within a URL, you need to percent-encode characters that have a particular meaning...
While debugging an intricate issue with failed HTTP requests I have come to appreciate the more advanced features of the...
Ruby has Enumerable.find(&block), which returns the first item in the collection for which the block evaluates to true.
To update your Rubygems to the latest available version, type the following: gem update --system Note that you have a...
On Ruby 1.9+, standard ruby character classes like \w, \d will only match 7-Bit ASCII characters: "foo" =~ /\w+/ # matches...
To check which rubygems versions your different rbenv rubys are using, you can use this small bash script:
CTRL + SHIFT + ALT + N Search for any symbol in your application, like CSS classes, Ruby classes, methods, helpers etc...
Very detailed guide to caching Ruby on Rails. Goes well with the official Rails guide on caching.
If a SOAP API expects you to call a remote method with arguments of complex types, Savon lets you manually...
Good article about ruby singleton classes.
Developing complex regular expressions quickly blows my mind. Here are some online regex editors that help you by highlighting matching...
Capistrano 3 is a major rework of the framework and requires several adjustments to your deploy configuration files. The biggest...
Re-creating a complex ActiveRecord scenario quickly without setting up a full-blown Rails app can come in handy e.g...
There are times when you have a chunk of text that you want to do something with, e.g. replace something...
TL;DR Under certain circumstances, dynamically defined symbols may break keyword arguments in Ruby 2.2. This was fixed in Ruby...
It is a common misunderstanding that all [op]=-operators work the same way, but actually they don't. ||= and &&=
When using send_file (for example for attachments of any kind), make sure your application knows the correct mime types...
You can freeze any Ruby object to prevent further modification. If you freeze an ActiveRecord and try to set an...
If you want to grow a Ruby Array, you might find out about #fill but it is not really what...
Code folding is a very useful feature to me. It gives me a quick overview over a file and keeps...