我是 ror 新手,我遇到了一个错误
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)>'