# Model.create(!) doesn't add to database, no errors

**URL:** <https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369>\
**Category:** Rails\
**Created:** [October 7, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369 "2008-10-07T20:27:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sovok](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@sovok](https://www.ruby-forum.com/u/sovok)\
**Post date:** [October 7, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369/1 "2008-10-07T20:27:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sovok](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@sovok](https://www.ruby-forum.com/u/sovok)\
**Post date:** [October 7, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369/2 "2008-10-07T20:47:45Z")

</div>

Could you post your code so we can take a look at the actual actions?

---

<div class="post-metadata">

**Author:** ![sovok](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5a626/32.png) [@sovok](https://www.ruby-forum.com/u/sovok)\
**Post date:** [October 7, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/model-create-doesnt-add-to-database-no-errors/150369/3 "2008-10-07T21:42:22Z")

</div>

Hello,

The correct syntax is

Model.create!(@attributes)

with the bang/exclamation point (!) after create, before the  
parentheses  
(not in them).

See  
[create! (ActiveRecord::Relation) - APIdock](http://apidock.com/rails/ActiveRecord/Validations/ClassMethods/create)!

Regards  
Kieran
