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 <==
If your terminal has many tabs, you'll want to keep them organized. To change their title from the prompt...
I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...
You might sometimes use self to capture the context of this before it is destroyed by some function. Unfortunately self...
We have released Modularity 2. It has many incompatible changes. See below for a script to migrate your applications automatically...
When you do something like this in your code: def var_value @var ||= some_expensive_calculation end
TLDR: This card explains which threads and processes interact with each other when you run a Selenium test with Capybara...
tl;dr: Using has_many associations with a :through option can lead to lost or duplicate records. You should avoid...
We've since created ActiveType which has a restricted subset of Virtus' features. It might be enough for your needs...
Before Rails 3.2.14, when supplying an invalid locale to I18n, it would fall back to its config.i18n.default_locale (which is...
What Rails version Within before_* Within after_* Cancel later callbacks Rails 1-4 return false return false Cancel later callbacks...
This error occurs when you already have a database.yml which defines the database for the cucumber environment instead of test...
Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
When you want to find out the data type of an attribute, you can just use ActiveRecord's columns_hash...
Usually our mysql queries are not case sensitive. In order to query case sensitive, you can use the mysql COLLATE...
Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...