ActiveRecord gives you the :include option to load records and their associations in a fixed number of queries. This is...

If you are using RVM on a Mac and cannot enter 8+ bit characters on an IRB or Rails console...

ActiveRecord models know how to cast a given string to the type of a given attribute (or column).

linux.die.net

Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1...

User.active.to_sql Rails 2 Use either the Edge Rider or fake_arel gem to get #to_sql backported...

The Basic Authentication header encodes username and password. Effectively, it's just Base64 plus a "Basic" prefix.

Simply add --dry-run, like this: sudo apt-get install --dry-run something This is great if packages would get...

Since version 1.5 RubyGems requires at least Ruby 1.8.7. The last one working with Ruby 1.8.6 was RubyGems 1.4.2.

blog.plataformatec.com.br

It is common in Rails 3.0 applications that you want to provide default views for a group of controllers. Let...

pivotallabs.com

One of the thornier problems in our workflow is knowing when assets are delivered from the designer and keeping them...

There is no way to do it. This behavior is by design. You lose.

makandra dev

When installing RMagick you may get an error messages like this: Version 2.13.1: checking for Ruby version >= 1.8.5... yes

I prefer using Opera's "User mode" to toggle an outlining of HTML elements quickly. This helps greatly when you...

By default, Opera 11 hides any passed params and the URL's protocol until you focus the address bar.

If you want to manually check if e-mail delivery works on a machine by sending an e-mail you...

apidock.com

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.

makandra dev
github.com

Artifice allows you to replace the Net::HTTP subsystem of Ruby with an equivalent that routes all requests to a...

makandra dev
mitmproxy.org

mitmproxy is an SSL-capable, intercepting HTTP proxy. It provides a console interface that allows traffic flows to be inspected...

There is a nasty bug in all version of Rails 2 and some versions of Rails 3.x where two...

makandra dev

If there is some weird margin at the top of your page for no apparent reason, chances are one of...

benmabey.com

Bryan talked about the differences between imperative and declarative scenarios. In my opinion, both styles have benefits and should be...

makandra dev

Within an event handler, there are multiple methods to cancel event propagation, each with different semantics. event.preventDefault() Only prevents the...

joemaller.com

Google’s Font Directory and API for web fonts could have a transformative effect on how we read the web...

makandra dev

If you're using jQuery, you need to update to 1.5.1 to get Internet Explorer 9 to work.