For some reason you want to define a find condition in array form. And in that condition both column name...

github.com

gem 'super_diff' Require it in your spec_helper.rb require 'super_diff/rspec' # For Rails applications you can replace this with 'super_diff/rspec-rails' Customize colors in spec/support/super_diff.rb SuperDiff.configure do |config...

...contain exactly "XXX" ActiveRecord::Base is monkey patched by super_diff/rspec-rails (includes rspec and rails) super_diff/rails (includes active_record and active_support) super_diff/active_record This means that you have...

Recent rails security updates have shown that people make incorrect assumptions about the possible contents of the params hash. Just don't make any! Treat it as what it is...

.../pages/edit?foo --> params == {:foo => nil} /pages/edit?foo[] --> params == {:foo => [nil]} # at least in older rails 3 and in rails 2.x Be especially wary about stuff like User.find_by_password...

...at the same time have a .where on an included table, two things happen: Rails tries to load all involved records in a huge single query spanning multiple database tables...

activity.users.ids # here happens the unexpected # => [4] Workarounds Preload separately In newer Rails versions you should prefer to use joins and then preload if necessary (which will trigger a...

github.com

...for old IEs. Unfortunately, their auto-loading mechanism may not work properly on your Rails application due to the asset pipeline. They use FileAPI, so you could just include it...

robots.thoughtbot.com

Arel is a library that was introduced in Rails 3 for use in constructing SQL queries. Every time you pass a hash to where, it goes through Arel eventually. Rails...

apidock.com

If you have an integer and want to use it to represent an element's position (like "1st" for 1...

When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...

...to be released when the block ends. Example: RSpec::Mocks.with_temporary_scope do allow(Rails).to receive(:env).and_return('production'.inquiry) puts Rails.env # prints "production" end puts Rails.env # prints...

makandra dev
github.com

Shortener is a Rails Engine Gem that makes it easy to create and interpret shortened URLs on your own domain from within your Rails application. Once installed Shortener will generate...

If you turn on stylesheet caching, it might happen that stylesheets from different locations with different relative pathes will be...

If you parse this Yaml ... yes: 'Totally' no: 'Nope' ... you get this Ruby hash: { true: 'Totally', false: 'Nope' }

weblog.rubyonrails.org

...identity map for ActiveRecord. Ruby 1.8.x support will be dropped with or after Rails...

alfajango.com

There is a problem with AJAX response handling for Rails 3 remote links and forms in Internet Explorer. This problem affects applications still using jQuery...

themomorohoax.com

SSL in Rails 3 is non-obvious...

github.com

This gem is designed to provide CSS views to Rails, and a process to concatenate and minify these files to one file for production...

yehudakatz.com

...post explains, in some detail, how we will implement a nice performance boost for Rails developers. Understanding the details might help gain the full benefits of the optimization, but you...

guides.rails.info

...walk you through the I18n API and contains a tutorial how to internationalize a Rails application from the start...

rails-i18n.org

YAML List of all translations currently available in Rails

blog.smartlogicsolutions.com

I just finished reviewing Rails 2.3 Nested Object Forms. While a very nice and “magical” feature, I’ve got to admit that I’m really not that crazy about how...

alexyoung.org

This article is an introduction to testing Rails plugins...

bark.metacasa.net

...the plain unit test suite supplied by Ruby, and not any of the extended Rails test framework. This will leave our plugin’s test classes with no access to fixtures...

github.com

Central point to collect locale data for use in Ruby on Rails...