Class: ActionKitRest::Actions::EventCreateAction

Inherits:
ActionKitRest::Action show all
Defined in:
lib/action_kit_rest/actions/event_create_action.rb

Instance Method Summary collapse

Methods inherited from Base

#create, #list, #normalized_base_path, #update

Instance Method Details

#base_pathObject



4
5
6
# File 'lib/action_kit_rest/actions/event_create_action.rb', line 4

def base_path
  'eventcreateaction'
end

#get(id) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/action_kit_rest/actions/event_create_action.rb', line 8

def get(id)
  ak_event_create_action = super

  # Aggregate fields parsed from referrenced entities' URI
  ak_event_create_action.obj['event_id'] = ak_event_create_action.event.match(/\/rest\/v1\/event\/(\d*)\//)[1]
  ak_event_create_action.obj['user_id'] = ak_event_create_action.user.match(/\/rest\/v1\/user\/(\d*)\//)[1]

  ak_event_create_action
end