4 find, first, last, allの呼び出し時に自動的にNamed Scopeの呼び出しを行います.
11 AutoScope.configure do |c|
16 ActiveRecord::Schema.define(:version => 0) do
17 create_table :people do |t|
25 class Person < ActiveRecord::Base
31 pluginなどでアタッチしたNamed Scopeを記述します.
35 Person.find(:first, :conditions => {:name => 'alice'})
36 # => Person.company.department(:first, :conditions => ... )
39 Copyright (c) 2009 Good-Day, Inc