action_kit_api 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
@@ -39,14 +39,21 @@ module ActionKitApi
|
|
39
39
|
signup_page_name = "#{self.name}_signup"
|
40
40
|
create_page_name = "#{self.name}_create"
|
41
41
|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
# These two calls trigger an exception EVEN IF THEY SUCCEED
|
43
|
+
begin
|
44
|
+
if ActionKitApi::Page.find_by_name(signup_page_name).nil?
|
45
|
+
signup_page = ActionKitApi::EventSignupPage.new(:name => signup_page_name, :title => "#{self.title} - Attend", :campaign_id => self.id)
|
46
|
+
signup_page.save
|
47
|
+
end
|
48
|
+
rescue
|
45
49
|
end
|
46
50
|
|
47
|
-
|
48
|
-
|
49
|
-
|
51
|
+
begin
|
52
|
+
if ActionKitApi::Page.find_by_name(create_page_name).nil?
|
53
|
+
create_page = ActionKitApi::EventCreatePage.new(:name => create_page_name, :title => "#{self.title} - Host", :campaign_id => self.id)
|
54
|
+
create_page.save
|
55
|
+
end
|
56
|
+
rescue
|
50
57
|
end
|
51
58
|
end
|
52
59
|
|
data/lib/action_kit_api/page.rb
CHANGED