method
new
v3.2.13 -
Show latest stable
- Class:
ActiveResource::Base
new(attributes = {}, persisted = false)public
Constructor method for new resources; the optional attributes parameter takes a hash of attributes for the new resource.
Examples
my_course = Course.new my_course.name = "Western Civilization" my_course.lecturer = "Don Trotter" my_course.save my_other_course = Course.new(:name => "Philosophy: Reason and Being", :lecturer => "Ralph Cling") my_other_course.save