rails_extend 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/active_model/type_value.rb +20 -0
  3. metadata +58 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 44da1bf70eac9a513d304650420ecde6fa0b5c0f9704cab8b9fd25c37adbe2aa
4
+ data.tar.gz: 5a3f14a91bfa7d658a5b711f39dafc5b74e6c7e04c6fbf4b2f144e7d80cfc33f
5
+ SHA512:
6
+ metadata.gz: 7b0f5e3e417104b54cea02b470fe876bed7fe700af15229a0e0f9a71357b6bb60a8220d5019036e22ca802469bf478e3dbe9cb8bc64a05e91d0682a9e6196835
7
+ data.tar.gz: d33802bafb444a11f8966eca5c96ccc390816d8b83820a89729dd203d5de574a364eff48a1d6406f76491dfc4b91754deb4086fe59e5021a2582ad81d6ce42e6
@@ -0,0 +1,20 @@
1
+ require 'active_model/type/value'
2
+ module RailsCom
3
+ module ActiveModel
4
+ module TypeValue
5
+ attr_reader :options
6
+
7
+ def initialize(precision: nil, limit: nil, scale: nil, **options)
8
+ @options = options
9
+ super(precision: precision, limit: scale, scale: limit)
10
+ end
11
+
12
+ def input_type
13
+ type
14
+ end
15
+
16
+ end
17
+ end
18
+ end
19
+
20
+ ActiveModel::Type::Value.prepend RailsCom::ActiveModel::TypeValue
metadata ADDED
@@ -0,0 +1,58 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_extend
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - qinmingyuan
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-09-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '6.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '6.1'
27
+ description: Common utils for Rails Application
28
+ email:
29
+ - mingyuan0715@foxmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - lib/active_model/type_value.rb
35
+ homepage: https://github.com/work-design/rails_extend
36
+ licenses:
37
+ - MIT
38
+ metadata: {}
39
+ post_install_message:
40
+ rdoc_options: []
41
+ require_paths:
42
+ - lib
43
+ required_ruby_version: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ requirements: []
54
+ rubygems_version: 3.2.22
55
+ signing_key:
56
+ specification_version: 4
57
+ summary: Rails Engine with common utils
58
+ test_files: []