我的模型中有未定义的方法,但我相信我有它。
class Business < ActiveRecord::Base
attr_accessible :user_id, :name, :city, :state, :zip, :street, :latitude, :longitude
def new_address
[street, city, state, zip].join(', ')
end
geocoded_by :new_address
after_validation :geocode, :if => :new_address_changed?
end
我收到未定义的方法错误,new_address_changed?
这是错误的吗?