I am using rails 3.2 and ruby 1.9.2. When i try to create a record with some assigned hash value it throws ArgumentError (comparison of Fixnum with nil failed)
exception.
My source code is
doc = ArtifactImage.create!(vars)
The value and schema for Image are listed below.
vars : {:parent=>#<ArtifactContainer id: 23, artifact_container_type_id: 2, party_id: 11, parent_id: 21, folder_id: nil, filing_center_group_id: nil, artifact_source_type_id: nil, display_date: nil, record_date: nil, display_name: "Pictures", path: "/bathakarai/Pictures", file: nil, description: nil, type: "ArtifactContainer", recycled: false, discarded_date: nil, signed: false, phr: true, record_status_id: 1, created_at: "2013-07-19 04:29:39", updated_at: "2013-07-19 04:29:39", lock_version: 2, lft: nil, rgt: nil>, :file=>"clip-art-tom-and-jerry-381931.jpg", :display_name=>"Pictures", :artifact_source_type_id=>3, :party_id=>11, :folder_id=>nil}
ArtifactImage : ArtifactImage(id: integer, artifact_container_type_id: integer, party_id: integer, parent_id: integer, folder_id: integer, filing_center_group_id: integer, artifact_source_type_id: integer, display_date: datetime, record_date: date, display_name: string, path: string, file: string, description: string, type: string, recycled: boolean, discarded_date: datetime, signed: boolean, phr: boolean, record_status_id: integer, created_at: datetime, updated_at: datetime, lock_version: integer, lft: integer, rgt: integer)
The same code is working fine in rails-2. Please guide me how to solve this issue