ru.Bee 2.2.6 → 2.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 46b99eba5153b96dfd184262a0c0c14c3b2ae535069dc4e4eefda5b10524e374
4
- data.tar.gz: d0d758ca04a0b75f9cd418eb7edc6cc8e5881778f4ecc010d12c8e9fef804544
3
+ metadata.gz: aab21c21cff250f991e5e1cba522989e46db0149bd5bf5e7817255cf0ef0bc82
4
+ data.tar.gz: ca03ebc252d70456d66b4d3177c9551ac4ff82d37fe645d60e5813c36637c05d
5
5
  SHA512:
6
- metadata.gz: 8e29f55fd3d8fa8231915e301a5b58c5720970b03d8f8a2c752d4582a1de28f1682a5dbf1ac03df43163711be174bb3d4445fc01f45ba7ae5a1718cb28b81829
7
- data.tar.gz: 2c9cb860f5daa2d1eba26bbc419733e412e14096c07f58e1ef819ea84a6fb1ca0adb28daf86ea80ad6b23b0bb145228055eed6d1d935580f04436def7e0c5c7e
6
+ metadata.gz: 65f45e769c4d8a6a3ff4917a6642992bf108f5fcd82a82a2afba785216d039f0936650e6e7c499d16c410ca9ada18330f0dbe43bbfdc061d89d517f6cf48f856
7
+ data.tar.gz: 5e73d0b8daf20401817eaf0e6b7d6db7c2909fda7f7bcb1b255188acd2b5cc242bd14d0374903701144bae6122b83a589d4b17694f05bae7444f1048e7674414
@@ -114,7 +114,7 @@ module Rubee
114
114
  if over
115
115
  sequel_dataset = klass
116
116
  .join(over.to_sym, "#{singularized_assoc_name.snakeize}_id".to_sym => :id)
117
- .where(fk_name.to_sym => id)
117
+ .where(Sequel[over][fk_name.to_sym] => id)
118
118
  self.class.serialize(sequel_dataset, klass)
119
119
  else
120
120
  klass.where(fk_name.to_sym => id)
@@ -218,8 +218,8 @@ module Rubee
218
218
 
219
219
  def serialize(suquel_dataset, klass = nil)
220
220
  klass ||= self
221
+ target_klass_fields = DB[klass.name.snakeize.pluralize.downcase.to_sym].columns
221
222
  suquel_dataset.map do |record_hash|
222
- target_klass_fields = DB[klass.name.pluralize.downcase.to_s.camelize.to_sym].columns
223
223
  klass_attributes = record_hash.filter { target_klass_fields.include?(_1) }
224
224
  klass.new(**klass_attributes)
225
225
  end
data/lib/rubee.rb CHANGED
@@ -17,7 +17,7 @@ module Rubee
17
17
  CSS_DIR = File.join(APP_ROOT, LIB, 'css') unless defined?(CSS_DIR)
18
18
  ROOT_PATH = File.expand_path(File.join(__dir__, '..')) unless defined?(ROOT_PATH)
19
19
 
20
- VERSION = '2.2.6'
20
+ VERSION = '2.2.8'
21
21
 
22
22
  require_relative 'rubee/router'
23
23
  require_relative 'rubee/logger'
data/lib/tests/test.db CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ru.Bee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Saltykov