Skip to content

Instantly share code, notes, and snippets.

@teejayvanslyke
Created August 30, 2010 18:30
Show Gist options
  • Select an option

  • Save teejayvanslyke/557814 to your computer and use it in GitHub Desktop.

Select an option

Save teejayvanslyke/557814 to your computer and use it in GitHub Desktop.
ITU::LegacyCourseManagement::User.create(
:first_name => "Teejay",
:lastname => "Smellsbad",
:usertype => "student",
:email => "[email protected]",
:student_attributes => {
:firstname => "Teejay",
:lastname => "Smellsbad",
:email => "[email protected]"
}
)
=> #<ITU::LegacyCourseManagement::User:0x104b87dd8 @prefix_options={}, @attributes={"lastname"=>"Smellsbad", "usertype"=>"student", "student_attributes"=>#<ITU::LegacyCourseManagement::User::StudentAttributes:0x104b87338 @prefix_options={}, @attributes={"lastname"=>"Smellsbad", "usertype"=>"student", "firstname"=>"Teejay", "email"=>"[email protected]"}>, "first_name"=>"Teejay", "email"=>"[email protected]"}, @errors=#<ActiveResource::Errors:0x104b219c0 @errors={"base"=>["Please assign a usertype 'student' to any user record that you want to create through the API."]}, @base=#<ITU::LegacyCourseManagement::User:0x104b87dd8 ...>>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment