Skip to content

Commit 1087079

Browse files
author
Ashish
committed
updating CustomFieldValue with nested path params added
1 parent 40467b0 commit 1087079

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lockstep_rails (0.3.89)
4+
lockstep_rails (0.3.90)
55
rails
66

77
GEM

app/models/lockstep/custom_field_value.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,16 @@ class Lockstep::CustomFieldValue < Lockstep::ApiRecord
22
self.model_name_uri = 'v1/CustomFieldValues'
33
self.id_ref = 'custom_field_definition_id'
44
load_schema(Schema::CustomFieldValue)
5+
6+
def update(attributes = {})
7+
attributes = HashWithIndifferentAccess.new(attributes)
8+
9+
@unsaved_attributes.merge!(attributes)
10+
attrs = attributes_for_saving.transform_keys { |key| key.camelize(:lower) }
11+
12+
# Label with CustomerLocale to be updated from here
13+
resp = resource.patch("CustomerLocale/#{attributes[:record_key]}", body: attrs)
14+
result = post_result(resp)
15+
end
16+
517
end

lib/lockstep_rails/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module LockstepRails
4-
VERSION = '0.3.89'
4+
VERSION = '0.3.90'
55
end

0 commit comments

Comments
 (0)