You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you...
You can use the whatlanguage gem to detect the language of a Ruby string. Note that it also has not...
When you load a record with find options that have SQL fragments in :select or :joins, ActiveRecord will make that...
Captify is a plugin for jQuery written by Brian Reavis (@brianreavis) to display simple, pretty image captions that appear on...
A jQuery plugin that sets a div or span to show a countdown to a given time
When submitting textareas, browsers sometimes include carriage returns (\r) instead of just line feeds (\n) at the end of each...
The state_machine gem ships with a scope with_state. This scope has some problems in complex queries or scope...
Update RubyGems and Passenger Bundler requires Rubygems >= 1.3.6. Run gem update --system if you have an older version.
Sometimes you want to fetch associations for an ActiveRecord that you already loaded, e.g. when it has deeply nested associations...
There are three ways to define your own RSpec matchers, with increasing complexibility and options: 1) Use RSpec::Matchers.define
When you need to add a event listener to hundreds of elements, this might slow down the browser. An alternative...
With this plugin, you can create a scalable tooltip by just using a single background image for the tooltip body...
When working with times and dates in Rails applications, you need to deal with the following problem: In Rails, Time...
This will eventually be integrated into jQuery UI with the multiple: true option, but right now this is the way...
Use this if you want to show or hide part of a form if certain options are selected or boxes...
jamesgolick / resource_controller at Github module ResourceController module Actions def index load_collection before :index response_for :index end
So you screwed up and copied Paperclip secrets from one project to another. Here is a semi-automatic, painful way...
Show all sockets (Unix & TCP/UDP), both listening and established ones: netstat -anp To limit the output e.g. to listening TCP...
Ruport’s acts_as_reportable module provides support for using ActiveRecord for data collection. You can use it to get...
When doing a query like this: SELECT id FROM users WHERE (users.id IN (899,1084,1095,100,2424,2429,2420...
An alternative to this technique is using VCR. VCR allows you to record and replay real HTTP responses, saving you...
String manipulation extensions for the Underscore.js javascript library.
This method is defined automatically and only given for boolean attributes create_table "users", :force => true do |t| t.boolean "email...
validates_attachment_content_type :image, :content_type => /^image\/(jpg|jpeg|pjpeg|png|x-png|gif)$/, :message => 'file type is not...