While you are probably using will_paginate to paginate ActiveRecord scopes, it can actually paginate plain Ruby arrays. The resulting...
With the impending release of Ruby on Rails 4, it looks like a lot of developers will be updating their...
Do this before you install the gem: sudo apt-get install libffi-dev
I’ve worked on huge applications in Ruby and Rails before. I very much want to believe in DCI, but...
Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and...
You can define methods in any example group using Ruby's def keyword or define_method method. These helper methods...
If you ever wondered why a constant wasn't defined or wasn't available where you expected it to be...
Great solution in a GitHub issue.
Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.
navy 0.5.1+ gives empty navigation containers a CSS class .navy-empty which you can hide via .navy-navigation &.navy-empty...
For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...
So you are debugging like a boss and lost track of where you actually are in your code? No problem...
I am talking about development speed. When your application starts growing and you start adding gems, it starts to take...
The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...
The very useful andand gem does not play very nice with Ruby's SimpleDelegator (or vice versa). This following will...
A technique to vastly reduce the number of join model records that need to be stored in the database.
If you get a stacktrace complaining about uninitialized constant MysqlCompat::MysqlRes a system library update might broke your gem.
When you have two models in a has_many, has_one or belongs_to association, the :inverse_of option in...
Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()")
Rarely, you might want to rebuild all gems with native extensions, because they might be compiled against outdated system libraries...
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...
In theory you can take any scope and extend it with additional joins or conditions. We call this chaining scopes...
If you require your Rails models manually, pay attention to the path you use. Unless you have...