Displaying 1 result from an estimated 1 matches for "sendstatus".
Did you mean:
  send_status
  
2006 Mar 23
8
DRY principle - how to implement?
...ave ''send_status'' table which looks something like these:
id      code    title
1 	sent 	Sent
2 	error 	Sending error
3 	success Success
Next I would like to associate some processed records with their 
''send_status''. Is it better to use:
1)
record.status_id = SendStatus.find(:one, :condition => "code=''sent''").id
to set status of record, or it would be better to set ''code'' as foreign 
key instead of ''id''. That way I could write:
2)
record.status_code = ''sent'';
I am not sure whic...