better_record 0.24.3 → 0.24.4

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: 88cdc8047be4c1b1006b88d015db75cc7f67f3d6bbd8b3c669c7976ef8832676
4
- data.tar.gz: 90a06143b66e33376d555df2e6ed34ff4ec50ea89707086078fc83a5bddb559e
3
+ metadata.gz: 5ff455d6c0733bd00110232de599657c78892eabedfdd9b8e0d9635708827644
4
+ data.tar.gz: 644cc1599840f0aa5cc018bbb443284ee4af68043c542579a2fab948da6ef1ed
5
5
  SHA512:
6
- metadata.gz: 56b684eac619a9dc67f117e7b4a4fe265b055a0d390b956b88f6f4505e3472947ebf1852eef5accfd1368f24f92ce3e93adb2bfec028230f1ed800304658db3f
7
- data.tar.gz: 51fbc287e8faa3d1b9dfc1c66a8cb7f9a77565d820ff45b910eb8647d031f05380049035f2d4cf770338d9496669103c0f78dc4456bd7347fdbd9ee1aa6dbcc0
6
+ metadata.gz: 393e7a7599b9c4807fb2f300fb37fd726f6a4fca9a9c9108a441dd9ce1d348c0a94282591a461c46b78744a9105f3bcafe475fe093326002506572b42ab0d728
7
+ data.tar.gz: 2624e8c6bb235930ecdd302bdc7446e58c57e9f39b9403bf17ea377dc114e20bc14e066fd6743099a55f67c2293621cae6bde5f8b7b92863b9a332d87ca62cf3
@@ -85,6 +85,7 @@ module BetterRecord
85
85
  end
86
86
 
87
87
  def del(*keys)
88
+ keys.flatten!
88
89
  i = 0
89
90
  keys.map {|k| data.delete(k) && (i += 1) }
90
91
  i
@@ -23,7 +23,7 @@ module BetterRecord
23
23
  $!.message, $!.backtrace if debug
24
24
 
25
25
  if type_val == :table_name_without_schema
26
- type_val = klass.table_name.to_s.split('.').first
26
+ type_val = klass.table_name.to_s.split('.').last
27
27
  else
28
28
  type_val = klass.polymorphic_name
29
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterRecord
4
- VERSION = '0.24.3'
4
+ VERSION = '0.24.4'
5
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Array
4
- def to_enum
4
+ def to_db_enum
5
5
  hashed = {}
6
6
  each {|v| hashed[v] = v.to_s}
7
7
  hashed
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.3
4
+ version: 0.24.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sampson Crowley
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-06 00:00:00.000000000 Z
11
+ date: 2020-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -360,7 +360,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
360
360
  - !ruby/object:Gem::Version
361
361
  version: '0'
362
362
  requirements: []
363
- rubygems_version: 3.0.6
363
+ rubygems_version: 3.0.3
364
364
  signing_key:
365
365
  specification_version: 4
366
366
  summary: Fix functions that are lacking in Active record to be compatible with multi-app