--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Creates a new resource instance and makes a request to the remote service that it be saved, making it equivalent to the following simultaneous calls:"
- !ruby/struct:SM::Flow::VERB 
  body: "  ryan = Person.new(:first =&gt; 'ryan')\n  ryan.save\n"
- !ruby/struct:SM::Flow::P 
  body: Returns the newly created resource. If a failure has occurred an exception will be raised (see <tt>save</tt>). If the resource is invalid and has not been saved then <tt>valid?</tt> will return <tt>false</tt>, while <tt>new?</tt> will still return <tt>true</tt>.
- !ruby/struct:SM::Flow::H 
  level: 4
  text: Examples
- !ruby/struct:SM::Flow::VERB 
  body: "  Person.create(:name =&gt; 'Jeremy', :email =&gt; 'myname@nospam.com', :enabled =&gt; true)\n  my_person = Person.find(:first)\n  my_person.email # =&gt; myname@nospam.com\n\n  dhh = Person.create(:name =&gt; 'David', :email =&gt; 'dhh@nospam.com', :enabled =&gt; true)\n  dhh.valid? # =&gt; true\n  dhh.new?   # =&gt; false\n\n  # We'll assume that there's a validation that requires the name attribute\n  that_guy = Person.create(:name =&gt; '', :email =&gt; 'thatguy@nospam.com', :enabled =&gt; true)\n  that_guy.valid? # =&gt; false\n  that_guy.new?   # =&gt; true\n"
full_name: ActiveResource::Base::create
is_singleton: true
name: create
params: (attributes = {})
visibility: public
