bitswitch 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bitswitch.rb +3 -0
- data/lib/bitswitch/version.rb +1 -1
- metadata +2 -2
data/lib/bitswitch.rb
CHANGED
@@ -168,6 +168,9 @@ if defined? ActiveRecord::Base
|
|
168
168
|
# Get the BitSwitch
|
169
169
|
val = val.to_switch(hash).to_hash.merge(input).to_switch(hash)
|
170
170
|
|
171
|
+
# Dont save if it cant save
|
172
|
+
return false if read_attribute(:id).nil?
|
173
|
+
|
171
174
|
# Write the updated value
|
172
175
|
update_column(column, val.to_i)
|
173
176
|
|
data/lib/bitswitch/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bitswitch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Have you ever wanted to store multiple true/false values in your database,
|
15
15
|
but annoyed with how many fields your tables have, then BitSwitcher is good for
|