dynamic-active-model 0.4.1 → 0.4.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: 20969c7130d6dd1e4d9fd94404fa7c1429657bcf8c2f7a952521e3518585b2d3
4
- data.tar.gz: 8e0ac474187143c277e4a6534d22a7755a7866bc7f1369c4134502b2e9bf702c
3
+ metadata.gz: 80a26c3336b3adc4aeb32e82699b5c6b88fd3ee1722fccdef4b5078a8aef2776
4
+ data.tar.gz: 45755211d6c67e8f4646923e1082977e2906ff464ef40c81cd93fbfb6b01c8ff
5
5
  SHA512:
6
- metadata.gz: e389fb994f7dfc8231f9d464ec5306328c819826b699da3b77345650d2fa7227d1c03cf743334aa4a6ba9a9f1ea6341adc50373a0a14f734c6650aa972fd52d9
7
- data.tar.gz: cb2dfb3348ee6d301154214a0e51ac638f54779cecfa10d398812845d41531f8f57b7ae4e286d5f393cdbfcf12cb49c629bd4af3c818ca9bc2316c1a645293e3
6
+ metadata.gz: 2e0cdd29bea6837ade3759c9fb9105784d2a94b4fa2583db7591f598e0b784a8e256809ffafd93f0d4ee01aff8ffcef5fd1064e8bd325b060ee89b9a832b7848
7
+ data.tar.gz: 676d3f6c102f9b011cf5bde8a35df44c6e0b45cd9106fdcc2fb1ed794c5b1b40c50f7a6c6b241a07b88f6aa4241487f033419c225e8664f38f64e035441b2b92
@@ -47,7 +47,10 @@ module DynamicActiveModel
47
47
  # rubocop:enable MethodLength
48
48
 
49
49
  def generate_class_name(table_name)
50
- table_name.classify
50
+ class_name = table_name.classify
51
+ return ('N' + class_name) if class_name =~ /\A\d/
52
+
53
+ class_name
51
54
  end
52
55
  end
53
56
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic-active-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-16 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.2.3
62
+ rubygems_version: 3.3.3
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: Dynamic ActiveRecord Models