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/ClassMethods/create!

Regards
Kieran


On Wed, Oct 8, 2008 at 5:33 AM, rpag <[EMAIL PROTECTED]> wrote:

>
> 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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to