Permalink
Browse files

- ActiveResource::Associations, added doc for has_one

  • Loading branch information...
1 parent b4bcc1f commit d55f51e4d7b23eec7da67db70b7810767f2a2e34 @gramos committed Oct 5, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 activeresource/lib/active_resource/associations.rb
@@ -62,6 +62,11 @@ module Associations
# has_one :project_manager
# end
#
+ # @project = Project.find(1)
+ # @project.project_manager = ProjectManager.find(3)
+ # @project.project_manager #=> #<ProjectManager:0x7fb91bb05708 @persisted=true,
+ # @attributes={"name"=>"David", "project_id"=>1, "id"=>5}, @prefix_options={}>
+ #
#
# === One-to-many
#

0 comments on commit d55f51e

Please sign in to comment.