我只是使用rails g scaffold test name:string attribute:string value:string
命令。爲什麼我不能使用字屬性表的列名作爲Ruby on Rails?
但是,當我保存填寫表格,我得到錯誤與活動記錄器屬性列。
根據我研究的gem'safe_attributes'gemfile,它解決了這個問題。我做了安裝。
這次在NoMethodError在測試#新
private method 'attribute'
呼籲錯誤。
Extected源(左右線#20):
<% = f.text_field :attribute %>
我怎樣才能解決這個問題?你可以幫我嗎。
可能的重複[我是否在Rails中使用保留字?](http://stackoverflow.com/questions/6553048/am-i-using-a-reserved-word-in-rails) –