class ActionKitRest::AllowedUserField

Public Instance Methods

base_path() click to toggle source
# File lib/action_kit_rest/allowed_user_field.rb, line 5
def base_path
  'alloweduserfield'
end
find(name) click to toggle source
# File lib/action_kit_rest/allowed_user_field.rb, line 9
def find(name)
  response = list(name: name)
  response.obj.first
end

Private Instance Methods

extract_id_from_response(resp) click to toggle source

We must override this, because the paths for allowed user fields use the name, not a numerical ID.

# File lib/action_kit_rest/allowed_user_field.rb, line 18
def extract_id_from_response(resp)
  resp.response.headers['location'].split('/').last
end