Rails 3.0 Parsing XML and Inserting into Database

后端 未结 3 2007
星月不相逢
星月不相逢 2021-02-11 08:48

I\'m new to Rails, and am trying to hook up my application to a third-party API (it does\'t have a gem or plugin for Rails).

Ideally, what I want to be able to do is par

3条回答
  •  被撕碎了的回忆
    2021-02-11 09:00

    I'd put a puts after getting the URL and another after defining events to see if there's any data being returned in the first instance. Then I'd check the Event model to see if there are any validations which aren't being met - does the model require a unique user_id or something. I'd also make data a non-instance variable to see if that made a difference. And I'd check that those time formats aren't causing an error in the model.

提交回复
热议问题