action_kit_api 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,8 +23,23 @@ module ActionKitApi
23
23
  super
24
24
  end
25
25
 
26
+ def signup(user)
27
+ raise "Can't signup to uncreated Event, please save" if self.id.nil?
28
+
29
+ event_campaign = ActionKitApi::EventCampaign.find_by_id(self.campaign_id)
30
+
31
+ action_attrs = {
32
+ :event_id => self.id,
33
+ :event_signup_ground_rules: 1,
34
+ :akid => user.akid,
35
+ :page: => "#{event_campaign.name}_attend"
36
+ }
37
+
38
+ ActionKitApi.act(action_attrs)
39
+ end
40
+
26
41
  def cancel
27
- raise "Can't cancel unsaved Event" if self.id.nil?
42
+ raise "Can't cancel to uncreated Event, please save" if self.id.nil?
28
43
 
29
44
  self.status = "cancelled"
30
45
  self.save
@@ -1,3 +1,3 @@
1
1
  module ActionKitApi
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 0
9
- version: 0.4.0
8
+ - 1
9
+ version: 0.4.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sam Stelfox