Ruby on Rails 3 Tutorial

Learn Rails by Example

By Michael Hartl

7 Readers

Cesar

Aslam

Asger

bias

tjg3911

Marius

the_hawk


Cesar Figueroa read 2 chapters in Ruby on Rails 3 Tutorial

4

Comment ·

Cesar Figueroa read 2 chapters in Ruby on Rails 3 Tutorial

2

Comment ·

Marius Butuc read 1 chapters in Ruby on Rails 3 Tutorial

7

Comment ·

Marius Butuc Ruby on Rails 3 Tutorial

the “equals-tilde” =~ operator for comparing strings to regular expressions

Comment ·

Marius Butuc read 1 chapters in Ruby on Rails 3 Tutorial

6

Comment ·

Marius Butuc Ruby on Rails 3 Tutorial

It’s worth noting that, once you have defined some attributes as accessible using attr_accessible, only those attributes can be modified using update_attributes.

Comment ·

Marius Butuc Ruby on Rails 3 Tutorial

When working at the console, it’s useful to keep an eye on the development log, which records the actual low-level SQL statements being issued by Active Record:

$ tail -f log/development.log

The -f flag ensures that tail will display additional lines as they are written. I recommend keeping an open terminal window for tailing the log whenever working at the console.

Comment ·

Marius Butuc Ruby on Rails 3 Tutorial

Though it’s not strictly necessary, you might find it convenient to annotate your Rails models using the annotate-models gem.

Comment ·

Marius Butuc read 1 chapters in Ruby on Rails 3 Tutorial

5

Comment ·

Marius Butuc read 1 chapters in Ruby on Rails 3 Tutorial

4

Comment ·

Prev Next