active-attr

    0熱度

    2回答

    類似的問題 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

    1熱度

    2回答

    我無法弄清楚這個問題,即使它似乎並不複雜... 我想打一個表格發送電子郵件在我的Rails應用程序,但是這一次不工作。我收到以下錯誤: TypeError in MessagesController#create:在發生 #<Message content: "test", email: "[email protected]", name: "test"> is not a symbol 錯誤:a

    5熱度

    2回答

    一個電話我與ActiveAttr工作,讓你擦洗塊通過塊選擇好的初始化: person = Person.new() do |p| p.first_name = 'test' p.last_name = 'man' end 然而,在一個特定的類,包括ActiveAttr ::型號,我想繞過這個功能,因爲我想用塊來做別的事情。所以在這裏,我們去: class Imperato

    0熱度

    2回答

    我正在使用active_attr和simple_form。 當我瀏覽到應該顯示我的窗體頁我收到以下錯誤: undefined method `new_record?' for #<Message body: nil, email: nil, name: nil, subject: nil> 這裏是我的模型: class Message include ActiveAttr::Mod