tramway-core 1.10.2.1 → 1.10.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aac117b74067a40bb519c7f5a610f26bd1eda19567e5ab48121f01f3f22b8324
|
4
|
+
data.tar.gz: 64a476aa026148544ab452ceb7ffb645b8e7a38629e5466889e53e48007b342c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d03d032e55e352ba0ed4c2cdd00139d27d2210d29e4b937d166b25c0a0c244649247b463aed6ab2f633e0762255a9ff18f0f63ae904a4e26aa546f860f329cec
|
7
|
+
data.tar.gz: cad84676fe9d325f3c6f56a1c9cc30f56293b6a691d9b40a69f8a8532260ba154b8d77d961d17de2fea3232e12926f9f49772bfd1b972e76c518959ec20dae75
|
@@ -109,7 +109,7 @@ module Tramway::Core
|
|
109
109
|
begin
|
110
110
|
@@model_class = model_class_name.constantize
|
111
111
|
rescue
|
112
|
-
error = Tramway::Error.new(plugin: :core, method: :model_class, message: ("There is not model class name for #{self.name}. Should be #{model_class_name} or you can use another class to initialize form object."))
|
112
|
+
error = Tramway::Error.new(plugin: :core, method: :model_class, message: ("There is not model class name for #{self.name}. Should be #{model_class_name} or you can use another class to initialize form object or just initialize form with object."))
|
113
113
|
raise error.message
|
114
114
|
end
|
115
115
|
end
|
@@ -2,12 +2,13 @@ class Tramway::Core::ExtendedApplicationForm < Tramway::Core::ApplicationForm
|
|
2
2
|
class << self
|
3
3
|
def properties(*args)
|
4
4
|
@@extendable_properties = args
|
5
|
-
super
|
5
|
+
super *args
|
6
6
|
end
|
7
|
+
end
|
7
8
|
|
8
|
-
def
|
9
|
+
def initialize(model)
|
9
10
|
@@extendable_properties.each do |prop|
|
10
|
-
unless model.
|
11
|
+
unless model.respond_to? prop
|
11
12
|
model.class.define_method prop do
|
12
13
|
end
|
13
14
|
model.class.define_method "#{prop}=" do |value|
|
@@ -16,5 +17,4 @@ class Tramway::Core::ExtendedApplicationForm < Tramway::Core::ApplicationForm
|
|
16
17
|
end
|
17
18
|
super
|
18
19
|
end
|
19
|
-
end
|
20
20
|
end
|
data/lib/tramway/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tramway-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.10.2.
|
4
|
+
version: 1.10.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Kalashnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reform-rails
|