작동하지 않습니다 그리고 내 객체 클래스에 몇 가지 범위를 생성하지만 난 내 코드 내에서 호출 할 때 오류 반환 :범위 선언은 레일 3에 내가 루비를 사용하고
irb>Transaction.first.committed
=> undefined method `commited' for #
객체 클래스를 :
class Transaction < ActiveRecord::Base
attr_accessible :amount, :description, :published, :task_description_id, :discrete_task_id, :transaction_type belongs_to :discrete_task scope :committed, where(:transaction_type => "committed") scope :obligated, where(:transaction_type => "obligated") scope :expensed, where(:transaction_type => "expensed")
end
도움 주셔서 감사합니다. –