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: 17dc7b147dd813ac2d7df44cbc05d7951b849b776a6641b0f463a91094bd6959
4
- data.tar.gz: ecefb51f2296f3a11f05d4b27ee1d52a087122ac3dab5ef1bd3f5e6b428daf0e
3
+ metadata.gz: aac117b74067a40bb519c7f5a610f26bd1eda19567e5ab48121f01f3f22b8324
4
+ data.tar.gz: 64a476aa026148544ab452ceb7ffb645b8e7a38629e5466889e53e48007b342c
5
5
  SHA512:
6
- metadata.gz: fa0c3a433134c99a548dc9dd83c074458524001b965e8e67d34c490c8bee91a86792402c1a3a6ba76a6d6fb43a910df8b8584e2cb16b6e049ebfe0dae0cc5b7f
7
- data.tar.gz: 31d97956e94405d0b78422cc927f4ac950b4e3ee40044a97ef89136cd8ec501e6300638a741a2822d199c3790b72d6af35a8a98a330c59a68c472819d7aeeac6
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(*args)
5
+ super *args
6
6
  end
7
+ end
7
8
 
8
- def new(model)
9
+ def initialize(model)
9
10
  @@extendable_properties.each do |prop|
10
- unless model.try prop
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
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Core
3
- VERSION = '1.10.2.1'
3
+ VERSION = '1.10.2.2'
4
4
  end
5
5
  end
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.1
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-28 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform-rails