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...
If you get a Quota error with OpenStack, it doesn't have to be what it tell. For example, I...
Sometimes you need to monitor a connection from your machine to a specific, single host or network in order to...
Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...
Font Combiner offers a way to tweak and adjust any TTF or OTF font (license permitting), by bringing in font...
One of many useful techniques when your test suite needs to talk to a remote API.
If you need to enable NewRelic monitoring on certain machines within the same Rails environment, a simple solution is to...
Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...
You're better off using debugger-ruby_core_source: gem install debugger-ruby_core_source If you can't do...
It is good programming practice to Don't Repeat Yourself (or DRY). In Ruby on Rails we keep our code...
Geordi 0.16+ supports running selenium tests with project-specific firefox versions. Just update the gem. It will still default to...
If you need to test interaction with a remote API, check out the VCR gem as an alternative to Webmock...
So you client has asked you to implement a row of buttons to like the URL on Facebook, Twitter and...
You might not know that Rails disables CSRF protection in tests. This means that if you accidentally forget to send...
If you want to have routes that are only available in tests (e.g. for testing obscure redirects), you can use...
There may be reasons to change the locale of your Postgres cluster. A popular one is your development system's...
Using text-transform: uppercase - especially on form labels - can cause you serious headaches in Selenium tests. Sometimes the web driver...
We sometimes send calender data or tasks using iCalendar (ICS) via eMail as specified in RFC 5545. Recently, a customer...
In contrast to RSpec's included allow_value matcher, the attached matcher will also work on associations, which makes it...
Preface: Normally, you would not need this in integrations tests (probably that's why it is so hard to achieve...
The translation method translate and its alias t have bang brothers: translate! and t!. They will raise I18n::MissingTranslationData on...
CSS3 comes with new unit rem. It works like em but it is always relative to the element instead of...
When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module...