This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...
If you run specs or your application and get an error like: ActionController::MissingFile in 'ProductsController#show, should render PDF...
To list the name and version of your Linux distribution, type the following: cat /etc/*-release
When you use the send_file method to send a local file to the browser, you can save resources on...
When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...
You know Firebug as a Firefox extension but there is also a "Lite" version which runs purely off JavaScript.
The idea is this: you take a job that you'd rather not do manually, and describe it to babushka...
A check if two date or time ranges A and B overlap needs to cover a lot of cases:
Note: Consider not doing this. Use form models or vanilla methods instead. The :conditions option for Rails associations cannot take...
Sometimes it is useful to define a named scope by implementing a static method with the scope's name on...
Given group size If you would like to split a Ruby array into pairs of two, you can use the...
There are times when you need to send SQL to the database, like this: def self.some_count(field) field = connection.quote...
When defining a trait using the Modularity gem, you must take extra steps to define constants to avoid caveats (like...
In case https://www.rubydoc.info/ is to slow or offline, you can also read a gem documentation offline. Start a server...
I love ETags, but there’s something that annoys me: most implementations revolve around pulling a record out of a...
Find-as-you-type boxes are usually built by observing changes in a text field, and querying the server via...
From time to time we're convinced that an error must be very close to the network card, OS IP...
It's that simple to allow one of your Linux users to run a single command as UID 0:
If you're on Ubuntu: sudo apt-get install ruby-dev On other platforms: Look for a package containing ruby...
This is for those who already own an SSL certificate (e.g. using it in the Apache HTTP Server) and need...
You cannot use Array#join on an array of strings where some strings are html_safe and others are not...
When you are using Apache for development, it still accepts connections from everyone in the same network as you.
If you want your application to display properly on iPad, iPhone or Android there are two things to do:
Call geordi clean from a project root to remove unused and unnecessary files inside it. This script is part of...