In Rails, you can very easily send emails with HTML and plaintext bodies. However, if you're trying to debug...
Use reorder to replace an existing order clause with a new expression.
If you get an error like this: An error occurred while installing pg (0.17.1), and Bundler cannot continue.
Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
require 'net/http' module Cheat extend self # the magic ingredient def host @host ||= 'http://cheat.errtheblog.com/' end def http @http ||= Net...
edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...
Directly from the MySql docs: There are three likely causes for this error message. Usually it indicates network connectivity trouble...
When connecting to multiple (i.e. > 4) servers to dive into logfiles or do security updates, terminator is what you want...
As you know, assignable_values does not invalidate a record even when an attribute value becomes unassignable. See this example...
When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...
jQuery plugin that makes it easy to dynamically add and remove records when using ActiveRecord's nested attributes.
ActiveRecord caches results of SQL queries. If you want to discard the cached results for one model, you can call...
Edge Rider gives your relations a method #origin_class that returns the class the relation is based on.
Declare an enum attribute where the values map to integers in the database, but can be queried by name.
Splitting a long method into sub methods is easier in instances since it is in classes. Since...
When you, as a developer, look at the choices used to build a particular application, you’re blown away at...
Local testing allows you to test your private and internal servers using the BrowserStack cloud, which has support for firewalls...
By default, Rails' validates_uniqueness_of does not consider "username" and "USERNAME" to be a collision. If you use MySQL...
Put the attached file to config/initalizers to ignore some fields for rejecting nested records (e.g. hidden input fields).
Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...
Like in any language, a FLOAT will eventually corrupt data due to rounding errors. Please use DECIMAL, which has well...
Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass...
If you get this error while trying to resize an openstack instance: # nova resize fooinstance 16 --poll ==> /var/log/nova/nova-scheduler.log <==