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

Tempfiles get deleted automatically With the the ruby Tempfile class you can create temporary files. Those files only stick around...

makandra dev

This article describes how to reset MySQL's or MariaDB's root password on your workstation. It's meant for...

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

makandra dev
sourceforge.net

ReText is a cross-platform WYSIWYG-ish Markdown editor. Toggle editor and preview layout with Ctrl+E.\

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.

You can say this in helpers like link_to and content_tag: = link_to 'Label', root_url, :data => { :foo => 'bar...

heartbeat.skype.com

There was a bug in Skype that could cause messages to be sent to incorrect recipients (anyone, not only people...

makandra dev

You can specify the version of bundler to execute a command (most often you need an older version of bundler...

In Rails 3.1+, instead of defining a separate up and down method you can define a single method change:

makandracards.com

Updated the card with our current best practice (shared app code and specs via symlinks).

makandra dev

has_defaults is now a gem, no longer a plugin. The plugin version no longer exists. Note that plugins are...

github.com

In moderately complex authorization scenarios you will often find yourself writing a map like this: class NotesController < ApplicationController power :notes...