When selecting records in a date range, take care not to do it like this: start_date = Date.parse('2007-05...

github.com

ExpandAnimations is a LibreOffice/OpenOffice.org Impress extension to expand presentation animations before exporting to PDF. This way the exported PDF will...

The tagged_with scope comes with many awesome options to modify your search: User.tagged_with("awesome", "cool") # Users that are...

github.com

Ruby bindings for Sundown, a fast and full-featured Markdown parser that lets you define renders for arbitrary output formats...

One of the most common production errors are ActionController::MethodNotAllowed errors. They usually happen when someone reloads a form by...

github.com

When internationalizing your Rails app, you'll be replacing strings like 'Please enter your name' with t('.name_prompt'). You...

github.com

Framework to write command-line apps in Ruby. Comes with a nice way of processing parameter options, some utility classes...

makandra dev

Git has a built-in repository viewer for your web browser. a bit similar (but less awesome) than github.

The SQL code generated by Graticule's spherical distance computation is insufficient and can lead to NULL distances in edge...

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

How to ignore new files Globally Add the path(s) to your file(s) which you would like to ignore...

"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...

tig path_to_file_or_files_or_path_with_wildcard

When using state_machine you sometimes need to know whether an object may execute a certain transition. Let's take...

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

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.

linux.die.net

You can convert git commits into patch files. Those can be used to apply to a different repository [1] or...

Please note that you can break your system with this! This is not recommended. Sometimes the package repository has errors...

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

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...

stackoverflow.com

Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.