提问人:user3457760 提问时间:5/9/2014 最后编辑:varduser3457760 更新时间:1/6/2016 访问量:77
ActiveRecord::RecordNotFound in CountriesController#主页
ActiveRecord::RecordNotFound in CountriesController#home
问:
我可以输入一个 ID 号,但是当我有下面的代码时,我收到错误:
ActiveRecord::RecordNotFound in CountriesController#主页
def home
@pin = Country.last
@countries = Country.all
#<the issue is on this line below>
@country = Country.find(params[:country_id])
gon.lat = @pin.latitude
gon.lon = @pin.longitude
gon
gon.countries = @countries
end
我做错了什么?
答:
评论