在我/app/views/institution/_form.html.erb我有自定義字段形成
<%= f.textfield :auto_complete_list %>
從獲取數據/app/models/institution.rb
def auto_complete_list
return self.county.city.name + ' '+ self.county.name
end
但是我不希望在按下按鈕時提交該消息。 我目前的解決方案是從params中刪除它[:institution] 是否有更簡潔的方法來從提交參數中移除只讀屬性?
你知道了,先生。 – nurettin 2011-06-08 05:16:34