Hi, I am trying to get form submitted data be submitted to my database, however not matter what I try it won't work. in script/console Model.create(args) adds to the database just fine. pastie is here I've tried .create(!), .save after it, and Model.new in the action index. Thanks for any help
on 2008-10-07 20:27
on 2008-10-07 20:47
Could you post your code so we can take a look at the actual actions?
on 2008-10-07 21:42
Hello, The correct syntax is Model.create!(@attributes) with the bang/exclamation point (!) after create, before the parentheses (not in them). See http://apidock.com/rails/ActiveRecord/Validations/...! Regards Kieran