Slide 5
Slide 5 text
ActiveRecord Scopes & Arel
‣ Before Rails 2.1
• Find methods with options hash
• No built-in method of options reuse
Where we came from
Author.find(:first, {:conditions => ['name = ?', 'Bob']})
Book.find(:all, {
:conditions => ['title LIKE ?', '%foo%'],
:order => 'title'
})