ffcrm_cloudfuji 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/models/event_rule.rb +4 -4
- data/lib/ffcrm_cloudfuji/version.rb +1 -1
- metadata +3 -3
data/app/models/event_rule.rb
CHANGED
@@ -25,7 +25,7 @@ class EventRule < ActiveRecord::Base
|
|
25
25
|
unless limit_per_lead.present? && count.count > limit_per_lead
|
26
26
|
# If :match is present, only apply the rule if data matches string
|
27
27
|
if match.blank? || (params['data'] && event_matches?(params))
|
28
|
-
if (app_id.blank? &&
|
28
|
+
if (app_id.blank? && page_name.blank?) || page_and_app_matches?(params)
|
29
29
|
# Run the action method if defined
|
30
30
|
if respond_to?(action)
|
31
31
|
send(action, lead, params)
|
@@ -101,15 +101,15 @@ class EventRule < ActiveRecord::Base
|
|
101
101
|
|
102
102
|
private
|
103
103
|
|
104
|
-
def event_matches?(
|
104
|
+
def event_matches?(params)
|
105
105
|
test_string = case_insensitive_matching ? match.downcase : match
|
106
106
|
case event_category
|
107
107
|
when 'cloudfuji_event_received'
|
108
|
-
match_string =
|
108
|
+
match_string = params['data'].inspect
|
109
109
|
match_string.downcase! if case_insensitive_matching
|
110
110
|
match_string.include?(test_string)
|
111
111
|
when 'lead_attribute_changed'
|
112
|
-
match_string =
|
112
|
+
match_string = params[1].to_s.dup
|
113
113
|
match_string.downcase! if case_insensitive_matching
|
114
114
|
match_string == test_string.to_s
|
115
115
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffcrm_cloudfuji
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -169,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 1944626669401206856
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
174
174
|
none: false
|
175
175
|
requirements:
|
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
178
|
version: '0'
|
179
179
|
segments:
|
180
180
|
- 0
|
181
|
-
hash:
|
181
|
+
hash: 1944626669401206856
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
184
|
rubygems_version: 1.8.24
|