I can change the foreign key for a row in the "calls" table through
the
console, but want to be able to assign a different login_id to a specific
"calls" record.
This is done through the controller and the view?
thufir@arrakis ~/goodfellow-tool $
thufir@arrakis ~/goodfellow-tool $ script/console
Loading development environment.>> c=Call.find_by_id(1)
=> #<Call:0xb6fc9070 @attributes={"id"=>"1",
"comment"=>"first",
"login_id"=>"1",
"created_at"=>"2008-02-08
13:37:29"}>>>
?> l=Login.find_by_id(2)
=> #<Login:0xb6fb8fb8 @attributes={"id"=>"2",
"employee_id"=>"1",
"login"=>"1234"}>>>
?> c.update_attribute :login_id, 2
=> true>>
?> c
=> #<Call:0xb6fc9070 @attributes={"id"=>"1",
"comment"=>"first",
"login_id"=>2, "created_at"=>"2008-02-08
13:37:29"}>>>
?> quit
thufir@arrakis ~/goodfellow-tool $
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---