ffcrm_cloudfuji 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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? && page.blank?) || page_and_app_matches?(params)
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?(match)
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 = match['data'].inspect
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 = match[1].to_s.dup
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
@@ -1,5 +1,5 @@
1
1
  module FatFreeCRM
2
2
  module Cloudfuji
3
- VERSION = '0.3.0'
3
+ VERSION = '0.3.1'
4
4
  end
5
5
  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.0
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: -1045058604205238337
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: -1045058604205238337
181
+ hash: 1944626669401206856
182
182
  requirements: []
183
183
  rubyforge_project:
184
184
  rubygems_version: 1.8.24