Q.  What am I doing wrong such that tx_batch_mtime is not receiving the
value I believe that I am assigning?  At this point current_entry has
not itself been saved.

I have this code:

puts( "***      ***" *3 )

      current_log_entry = current_entry.edi_log_entries.build

puts( current_log_entry.class )
puts( hash[:current_batch][:tx_batch_mtime] )

      current_log_entry.tx_batch_mtime = \   # linebreak for clarity
        hash[:current_batch][:tx_batch_mtime]

puts( current_log_entry.to_yaml )
puts( current_entry.cctn )
puts()

Which produces this output:

      ***      ******      ******      ***
      CaCustomsEdiLogEntry
      1276181402
      --- !ruby/object:CaCustomsEdiLogEntry
      attributes:
        tx_batch_number:
        created_at:
        changed_by: " "
        tx_message_function:
        tx_record_type:
        tx_batch_date:
        lock_version: 0
        tx_batch_account:
        created_by: " "
        accessed_at:
        tx_batch_mtime:
        tx_message_data:
        changed_at:
        accessed_from: " "
        ca_customs_entry_id:
        accessed_by: " "
      attributes_cache: {}

      changed_attributes: {}

      destroyed: false
      marked_for_destruction: false
      persisted: false
      previously_changed: {}

      readonly: false
      13466600016294

      1276181402
      20100610
      13466
      009

As you can see, current_edi_log.tx_batch_mtime is nil whereas I expect
it to be 1276181402.  Why?

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to