See attached link for a way to extract the conditions of a named scope in Rails 2.3.
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...
In our continued quest to extract proven code snippets from makandropedia into tested and upgradable gems, we have released Edge...
About Chrome's network stack and optimizations to load web pages faster.
Mobile browser's ignore the autoplay attribute on and elements. Stupid reasons include saving mobile bandwidth on behalf of the...
Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the...
When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...
Over the next year, there are a number of technologies coming down the pipeline that have the potential to radically...
If you're using the Capybara webdriver, steps sometimes fail because the browser hasn't finished loading the next page...
url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com Note that this will raise an error if the given argument is...
If you require your Rails models manually, pay attention to the path you use. Unless you have...
Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...
pjax loads HTML from your server into the current page without a full reload. It's ajax with real permalinks...
A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...
Never name your shared example group *_spec.rb. Otherwise rspec will try to load your example group as a spec and...
Today, I ran into trouble on a fairly fresh installed VM, running Ubuntu. I tried to bundle install and got...
Lately, I came across a nasty error. I had a class Article that included FooTrait and BarTrait. In BarTrait, I...
LibreOffice Impress, Writer, etc. doesn't embed most fonts into the PDFs it generates. This means if you share a...
If you're suffering from a huge de.yml or similiar file, cry no more. Rails lets you freely organize your...
This script loads a dump into your development database. You can provide the full path to you database dump like...
There is a conflict between current capistrano versions and the 2.5.1 net-ssh gem. Make sure you upgrade to 2.5.2...
MySQL version 5.1 comes with an alternative, faster InnoDB implementation (called "InnoDB Plugin"). Switching is easy: Stop your mysqld with...
This is for you when you want to mount a dmcrypt encrypted partition manually, e.g. from a live CD.
This will give you the string that appears most often in an array: names = %w[ foo foo bar bar bar...