ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...
For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...
In Rails 2, when calling instance_eval or instance_exec on a scope, the scope will fetch its records from...
imgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement...
I am talking about development speed. When your application starts growing and you start adding gems, it starts to take...
As the title says: this jQuery plugin creates bar charts from HTML tables. It comes in some different flavors.
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...
Installation differs slightly from older versions, please check the README.
YourClass.reflect_on_all_associations.map(&:name) Get the class name by calling class_name, or the type of the association (belongs_to, has_many...
gleeBox is an experimental project that takes a keyboard-centric approach to navigating the web. It provides alternatives to actions...
Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is...
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...
If your application has forms to edit string fields, you probably want to strip the entered values (remove whitespace from...
“Fat models” cause maintenance issues in large apps. Only incrementally better than cluttering controllers with domain logic, they usually represent...
Many jQuery plugins suffer from a good plugin architecture. When you write jQuery plugins you should use the plugin pattern...
Example task: Multiply the table holidays between several stages. Open two terminals: shell-for stage_1 shell-for stage_2...
This didn't work for me. Seems display is already taken in Machinist. # in spec/support/blueprints.rb Partner.blueprint do company_name