In order to request a SSL certificate from any dealer, you usually need a CSR certificate. As both the CSR...

damieng.com

Very nice font for programming.

Copy the attached Ruby code to config/initializers, or paste it into your IRB console. You can now dump any two...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

When your cucumber features grow massively over time, the test execution can take a lot of time.

Capybara allows you to select DOM elements, e.g. by using field, find_field(...) or field_labeled(...): role_select = field_labeled...

makandra dev

Validations that need to access an associated object may lead to some trouble. Let's exemplify that using this example...

When deploying an application with "cap deploy" by default [1] you only deploy your code but do not run migrations...

travisonrails.com

You set a flash message and it shows up as it should. However, it is displayed again the next time...

The Edge Rider gem will define a method collect_ids on your ActiveRecord models, scopes, integer scalars and collections, which...

ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...

apidock.com

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.

benmabey.com

Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...

redmine.org

Phillip Koebbe from Ruby on Rails suggested inserting following code between the "bootstrap" and "initialize" sections of enviroment.rb. This hack...

makandra dev

The information in this card is only relevant for Rails 2.3-era apps. This note gives a quick introduction into...

Sometimes you can make your life easier by not allowing a record attribute to be changed after the record was...

devstructure.com

blueprint is DevStructure’s workhorse tool that looks inside popular package managers, finds changes you made to configuration files, and...

makandra dev
github.com

The shell variable PS1 holds your bash prompt. You might want to change it to serve your needs best. Here...

When you need to insert many records into the same table, performance may become an issue. What you can do...

If you have the following deprecation warning after upgrading to rails >= 2.3.10 DEPRECATION WARNING: The :overwrite_params option is deprecated...

rhnh.net

In order to cover some edge cases you rarely care about, Range#include? will become very slow in Ruby 1.9...

makandra dev
innig.net

If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...

adobe.com

Flash movies (.swf files) can talk with Javascript code embedded in the same HTML page. There are two ways to...

Note: For PostgreSQL you should use advisory locks. For MySQL we still recommend the solution in this card.