rails3でscopeを使うときの注意点 scope :unfinished, proc { where("ending_at > ?", Time.now) } のあとにunfinishedにさらに条件を追加する場合に scope :unfinished_and_status, unfinished.where(:status => 1) としてしまうと、unfinishedのTime.nowが固定されてしまうので scope :unfinished_and_status, proc{ unfinished.where(:status => 1)} とする必要がある。