Hi,
I am trying to use the update method of activerecord with an array of
ids as the first param.
It does not update any row. The APIs say that it should work.
The array contains 2 IDs.
RSCampaign.update([1,2], {:end_date =>
Date.strptime(“120228”,"%y%m%d")})
If I put an ID instead of the array, it updates fine.
I am trying to use the update method of activerecord with an array of
ids as the first param.
It does not update any row. The APIs say that it should work.
What error message do you get? Do both of those IDs map to records? Do
either
of them get updated?
Hi,
I am trying to use the update method of activerecord with an array of
ids as the first param.
It does not update any row. The APIs say that it should work.
The array contains 2 IDs.
RSCampaign.update([1,2], {:end_date =>
Date.strptime(“120228”,"%y%m%d")})
If I put an ID instead of the array, it updates fine.
API says that exactly:
RSCampaign.update([1,2], {:end_date
=>[Date.strptime(“120228”,"%y%m%d")}]*2)
Hi,
I am trying to use the update method of activerecord with an array of
ids as the first param.
It does not update any row. The APIs say that it should work.
The array contains 2 IDs.
RSCampaign.update([1,2], {:end_date =>
Date.strptime(“120228”,"%y%m%d")})
people is a Hash
people.keys is an Array of keys # [1,2]
people.values is an Array of values # [{ “first_name” => “David” }, {
“first_name” => “Jeremy”}]