Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> t = Task.new :name => "test"
- t = Task.new :name => "test"
- => #<Task id: nil, name: "test", priority: nil, duration: nil, description: nil, parent_id: nil, created_at: nil, updated_at: nil>
- >> t.users
- t.users
- => []
- >> ref = TaskReference.new
- ref = TaskReference.new
- => #<TaskReference id: nil, user_id: nil, parent_id: nil, position: nil, task_id: nil, role: nil, created_at: nil, updated_at: nil>
- >> ref.user = User.first
- ref.user = User.first
- => #<User id: 1, login: "quentin", email: "quentin@example.com", crypted_password: "00742970dc9e6319f8019fd54864d3ea740f04b1", salt: "7e3041ebc2fc05a40c60028e2c4901a81035d3cd", created_at: "2009-05-22 15:44:50", updated_at: "2009-05-27 15:44:50", remember_token: nil, remember_token_expires_at: nil>
- >> t.task_references << ref
- t.task_references << ref
- => [#<TaskReference id: nil, user_id: 1, parent_id: nil, position: nil, task_id: nil, role: nil, created_at: nil, updated_at: nil>]
- >> t.users
- t.users
- => []
- >> t.task_references
- t.task_references
- => [#<TaskReference id: nil, user_id: 1, parent_id: nil, position: nil, task_id: nil, role: nil, created_at: nil, updated_at: nil>]
Add Comment
Please, Sign In to add comment