refer 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c8a0abb5e281f32bf502b1de5c76ce89d8f39414a5e03b5f499339a6d253fee
4
- data.tar.gz: 1c2a9895ad6841fcef7511c6dc3d591ead6ad944ffdd32b15327541204ab3a7b
3
+ metadata.gz: 1c0b4ef5d6babacbd720f0b0b8ec807d09b5073e26f059978b75ef183e437962
4
+ data.tar.gz: 46e08c8caee9dc594535199dac39c55cae05d0dc7b253d9e2918ac9a0fbae201
5
5
  SHA512:
6
- metadata.gz: 5dafc7f167fbdaa7de09c830a1fc37384e3c775bc12daa0e95a3bcd01b753869c558c95148b5dfe76e56ef94ded5df5a9ad554ee8e8250d90be9c2cc6e3875c2
7
- data.tar.gz: 5b6cdb88cad2df78e0cfc63a31389b6dd4fda8e06d82acd7ad9ddd0dd844038f5d0c1918b536972528b858260e7fa61645f0935e54ba84044b48a12f37b1e70b
6
+ metadata.gz: f45a3afc36d2965410d65d47a0b9c3b216ee51f2008a0b4c0836e7236e36d3a949452f31c8aa64be31f2d9073e6eef3138f3e6ca014b3699e7ea2c9984176447
7
+ data.tar.gz: 98f214d7321441fdc95b9e01207e0a4aff73435d11b032b28adb40ac20254a3d759f88288e6faa61477ff85014e5374911a922c1e988fef219f9e60a45a3d3d7
@@ -4,6 +4,8 @@ module Refer
4
4
  belongs_to :referee, polymorphic: true
5
5
  belongs_to :referral_code, optional: true, counter_cache: true
6
6
 
7
+ scope :completed, -> { where.not(completed_at: nil) }
8
+
7
9
  before_validation do
8
10
  self.referrer = referral_code&.referrer
9
11
  end
data/lib/refer/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Refer
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-15 00:00:00.000000000 Z
11
+ date: 2024-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  requirements: []
78
- rubygems_version: 3.5.13
78
+ rubygems_version: 3.5.14
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Referral codes & affiliate links for Ruby on Rails apps