類似的問題 Rails contact form not working 指南:https://github.com/thomasklemm/email_form_rails 軌3.2.x中 應用程序\型號\ message.rb class Message
include ActiveAttr::Model
include ActiveModel::Validations
我無法弄清楚這個問題,即使它似乎並不複雜... 我想打一個表格發送電子郵件在我的Rails應用程序,但是這一次不工作。我收到以下錯誤: TypeError in MessagesController#create:在發生 #<Message content: "test", email: "[email protected]", name: "test"> is not a symbol 錯誤:a
一個電話我與ActiveAttr工作,讓你擦洗塊通過塊選擇好的初始化: person = Person.new() do |p|
p.first_name = 'test'
p.last_name = 'man'
end
然而,在一個特定的類,包括ActiveAttr ::型號,我想繞過這個功能,因爲我想用塊來做別的事情。所以在這裏,我們去: class Imperato