If you require your Rails models manually, pay attention to the path you use. Unless you have...

In a Rails application, *_spec.rb files get special treatment depending on the file's directory. E.g. when you put a...

Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...

If some of your JavaScripts fail on Internet Explorer, but only in staging or production environments, chances are that JavaScript...

Never ever declare your associations with a string, especially when doing metaprogramming. A common mistake is something like # WRONG

The ActionMailer in Rails 2 depends on a buggy version of TMail, which sometimes inserts a blank line into the...

simple_format ignores Rails' XSS protection. Even when called with an unsafe string, HTML characters will not be escaped or...

Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...

rubyforge.org

Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18...

If you have an html_safe string, you won't be able to call gsub with a block and match...

If you want to update some records with boolean fields in a migration, always remember to set your values with...

In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...

With the the Ruby Tempfile class you can create temporary files. Those files only stick around as long as you...

Note: Instead of using the method in this card, you probably want to use ActiveType's nested attributes which is...

Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2...

logicalfriday.com

How delayed jobs can make your after_save callbacks execute before the record is saved.

github.com

In Selenium features the server and client are running in separate processes. Therefore, when mocking time with a tool like...

So you got this error, even though your Gemfile bundles mysql2: !!! Missing the mysql2 gem. Add it to your Gemfile...

blog.jetbrains.com

A number of issues concerning Sass/SCSS autocompletion and syntax highlighting were submitted as a feedback for RubyMine 4.5. Web development...

dan-manges.com

For custom Rake tasks, you shouldn't need to modify them after the original definition. However, if you want to...

When you develop a gem and you have a Gemfile in your project directory, you might be surprised that your...

Don't say is_a?(ActiveRecord::NamedScope::Scope) because that is no longer true in Rails 3 and also doesn...

... you probably have a time zone issue. When you get Timecop.travel(Date.parse("2011-11-11 00:00") do Time.current # Thu...

makandra dev
github.com

The asset pipeline from Rails 3.1 packported to 2.3. By Michael Grosser from parallel_tests fame.