active_flags 0.3.1 → 0.3.2

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: 2e7a7ae6d57b7d260e5544dba935de74fe2f8a4bcd8559c3479eb19bd8daa13d
4
- data.tar.gz: f3b8b5e4a0a20cf9b9b860dc82bb6e145f7432d273fa757ae211d38745db67d1
3
+ metadata.gz: 38b1db29753a873e71a1b3146605bbe36f5ba1c66e411be44367f5971b5a1eba
4
+ data.tar.gz: 0245ea51df381b0497f482356c4a81788c6e9ca02a1d3c859c55bc9e28fa2417
5
5
  SHA512:
6
- metadata.gz: d93513fae1dce7c4bcf8fe483ddf5c3092abd870144207be8394cee0fedbb4bd1568d898bc0c275c6d22c3924d09e946ebe2806f6c8708b679438647038e9cfd
7
- data.tar.gz: 19de22753247e3fdfd7482171871f115b20784a4d84b6fdbeb32a2ee8cddb76d873de1f4cb2e20e18d49feaca52aa52fcd31141bab4a1c034027304ed43a758d
6
+ metadata.gz: 4acd21ebfcee4c8ac6ccd1550d6442933e4bfe920aad899cebddcb6888d080f5f4ad029afbaa32914861caaca941e20311587dde143aa21a658d93c206825ebd
7
+ data.tar.gz: 71894e8a717786a27fc3143ec70de063c7ee07b1b6eb5d2eb5b4c45e3a20bcf358bec8cef8b9b76972d95630ee20671977e65e97f54e292c70c73a1fda9b1b76
data/README.md CHANGED
@@ -76,7 +76,7 @@ user.update!(flags: { visible: true, active: true, diet: 'vegan', power: 'super
76
76
  To access your flags, you now have 2 ways.
77
77
  Either as a hash, with the `flags` method or as an ActiveFlag::Flags collection with the `flags_as_collection` method.
78
78
 
79
- ## Flags as scopes
79
+ ## Flags as scopes
80
80
 
81
81
  When you develop an app without active_flags, you will generally query the equivalent of flags as simple booleans.
82
82
 
@@ -118,4 +118,4 @@ User.not_flagged_as_intelligent('a bit')
118
118
  https://github.com/FidMe/active_flags
119
119
 
120
120
  ## License
121
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
121
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -7,10 +7,11 @@ module ActiveFlags
7
7
  end
8
8
 
9
9
  def save
10
- ActiveFlags::Flag.find_or_initialize_by(subject: @resource, key: @flag_attributes[:key])
11
- .update!(value: @flag_attributes[:value])
12
- @resource.reload
10
+ flag = ActiveFlags::Flag.find_or_initialize_by(subject: @resource, key: @flag_attributes[:key])
11
+ flag.update!(value: @flag_attributes[:value])
12
+
13
+ @resource.flags_as_collection << flag
13
14
  end
14
15
  end
15
16
  end
16
- end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveFlags
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_flags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Huberty