我使用LinkedIn寶石拉個人資料信息的回報率3破折號屬性名沒有得到NoMethodError
- 寶石:https://github.com/pengwynn/linkedin
- API文檔:https://developer.linkedin.com/documents/profile-fields#positions
一切正常,除了當我到達名稱中帶有短劃線的財產時。
<%=position.title %>
正確顯示,但是<%= position.start-date %>
返回Users#show
- undefined method start
。
我試過不同的操作,如「startDate」,「start_date」,「開始日期」周圍的引號,但都沒有工作。
有沒有適當的方法來逃避財產名稱中的破折號/連字符?
這是我的錯。我有一個老版本的寶石。 – 2012-04-27 16:40:39