Browsers usually cache favicons. If you update the favicon of your web site and want all visitors to see the...

dev.housetrip.com

Introducing Trailer from HouseTrip, a simple menu bar app that helps you manage your GitHub pull requests. It’s one...

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...

In Ruby, classes and modules are called constants. This card explains how Ruby resolves the meaning of a constant.

CarrierWave attachments have two distinct methods #url and #path which appear to behave the same: document.file.url # => /storage/documents/4/letter.doc document.file.path # => /storage/documents/4/letter.doc

makandra dev
github.com

Rack::Attack is a rack middleware to protect your web app from bad clients. It allows whitelisting, blacklisting, throttling, and...

Use protocol independent URLs whenever possible so that the browser will choose the protocol related to the protocol which the...

When I upgraded from 0.5.4 PDFKit deadlocked or crashed when an ApplicationController::RouteError occured. If this error happens only because...

Ubuntu 12.04 LTS x64, Ruby 1.8.7, Rails 2.13, PDFKit 0.5.4, Phusion Passenger Apache 2 I ran into this, when I...

github.com

Weighttp is threaded and might exhaust resources of an application better than ApacheBench or httperf. You need libev installed.

makandra dev
github.com

We proudly release our safe_cookies middleware into public beta and just published it on Github. Features are:

Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is...

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...

makandra dev
github.com

Chrome extension that shows all info from your rails log (like parameters, response times, view rendering times, DB requests) inside...

stackoverflow.com

If you want to have routes that are only available in tests (e.g. for testing obscure redirects), you can use...

After running bundler / gem install I could not load nokogiri lately. It died with cannot load such file -- nokogiri/nokogiri.

rubydoc.info

Preface: Normally, you would not need this in integrations tests (probably that's why it is so hard to achieve...

Consul 0.10.0 now allows multiple power mappings for nested resources. When using nested resources you probably want two power

In order to keep the controllers directory tidy, we recently started to namespace controllers. With the :controller option you can...

Shared example groups are a useful RSpec feature. Unfortunately the default directory structure generated by rspec-rails has no obvious...