-3
我是新來的回報率和我得到了一個錯誤Ruby on Rails的,未定義的方法 '屬於'
class Item < ActiveRecord::Base
attr_accessible :latitude, :longitude, :photos, :price, :title, :user_id, :category_id
attr_accessor :user_id, :category_id
belongs_to :user
belongs_to :catgory
reverse_geocoded_by :latitude, :longitude
after_validation :reverse_geocode
end
調用堆棧是:
ActionController::RoutingError (undefined method `belings_to' for #<Class:0x00000003b1c418>):
app/models/item.rb:5:in `<class:Item>'
app/models/item.rb:1:in `<top (required)>'
app/controllers/item_controller.rb:1:in `<top (required)>'
你的錯誤提到'belings_to' - 你確定輸入正確嗎? – PinnyM