rails-erd.rubyforge.org

Gem to generate entity relationship diagrams from your Rails 3 ActiveRecord models. The diagram style is pretty and configurable.

For performance improvements (and to remove the need for eager loading), the ActsAsTaggableOn gem supports caching your tag lists directly...

blog.carbonfive.com

I still see people promoting various gems and plugins to handle miscellaneous configuration elements for your application. One little known...

beginrescueend.com

To use different Ruby versions on your computer you can use the Ruby Version Manager. It also allows you to...

"Classic" Excel (XLS) has a magic limit of 65535 rows per worksheet. This was fixed in XLSX but the version...

When you have objects in your database that hold latitude and longitude and you want to find others that are...

makandra dev

ActiveSupport's memoize has a dangerous feature you might not know about. Assume you have class DeepThought extend ActiveSupport::Memoizable...

require 'open-uri' File.open('/target/path/to/downloaded.file', "wb") do |file| file.write open('http://example.com/your.file').read end Basic Authentication

There are several options, but most of them are impractical. The best way is to use the :ruby filter:

If you get an error like this: Unable to launch /home/bruce/Projects/myproject/tmp/capybara/capybara-201110311210111407691101.html ... update your launchy gem. It failed for us in...

After starting the Rails server in a freshly generated Rails 3.1 project you could see an error message such as...

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...

Clearance is a gem that provides authentication functionality (e.g. login, logout). This note explains, how the clearance login, logout and...

By default, Rails views escape HTML in any strings you insert. If you want to insert HTML verbatim, you need...

danhixon.github.com

If you encounter the error message above when running cucumber, just execute... rm rerun.txt ...in the Rails directory.

rubyinside.com

While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to...

The most common use case for Ruby's #collect is to call a method on each list element and collect...

makandra dev

In order to monitor a Rake task using God your Rake file must write a file with its process ID...

github.com

Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...

When you require the Ruby debugger to be available from your Rails console (e.g. you want to inspect a method...

When adding a new field to your model's database table, don't set any defaults in the database.

makandra dev

Oniguruma is an advanced regular expression engine for Ruby. Install Oniguruma with binary dependencies like this: sudo apt-get install...

The technique described in this card has an important caveat: The result of GROUP_CONCAT is truncated to the maximum...

You can use heredoc to avoid endlessly long lines of code that nobody can read. Heredoc strings preserve linebreaks and...