driftrock-service 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,12 +27,6 @@ module Driftrock::Service::DriftrockModel
27
27
  :adwords, :conversion].each do |channel|
28
28
  define_method("has_#{channel}_channel?") do
29
29
  channel_type = channel.to_s
30
- if channel == :adwords
31
- channel_type = "google_adwords"
32
- end
33
- if channel == :conversion
34
- channel_type = "google_analytics"
35
- end
36
30
  has_channel?(channel_type)
37
31
  end
38
32
  end
@@ -43,7 +37,14 @@ module Driftrock::Service::DriftrockModel
43
37
  end
44
38
 
45
39
  def channel_by_type(channel_type)
46
- channels.find do |channel|
40
+ channels.find do |channel|
41
+ channel_type = channel_type.to_s
42
+ if channel_type == "adwords"
43
+ channel_type = "google_adwords"
44
+ end
45
+ if channel_type == "conversion"
46
+ channel_type = "google_analytics"
47
+ end
47
48
  channel.channel_type.name == channel_type
48
49
  end
49
50
  end
@@ -1,5 +1,5 @@
1
1
  module Driftrock
2
2
  module Service
3
- VERSION = "0.4.8"
3
+ VERSION = "0.4.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: driftrock-service
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.8
5
+ version: 0.4.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Max