tramway-core 1.0.6 → 1.1.0

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: 0b40f30c949b8415d8f080cfa8542e6b52cde075c0a078eb4e946acc612f2296
4
- data.tar.gz: 8a57f65e4b2152817e3af3c8bf72214d08d0b69cf8b45c08cb6eb77cfd1d4d4a
3
+ metadata.gz: 24a4a0a529963201bd89848634411b031498730868040a6fcfeae1375f57a97b
4
+ data.tar.gz: a624cdc01cda2ef6041c7e0b6468ce9a5a9a5fea63a6ca2bbaff307df02a2927
5
5
  SHA512:
6
- metadata.gz: c508b43b820bdd4079565c119326e1be2a1d8ee29ee231b96aad89e9fde4b991b9b73d75bef98fe003693b664fa9cf1f4b8721dd52a639b096254675749fe580
7
- data.tar.gz: 97cb09a759dfa5dd4a422ade0f973b0c9ca2793fd94aa4556ab72ed7f3d7f471ad1325402ac16e4791af7fa43146dad4652a2b7d9a7297a28ad5c030aa7bd76a
6
+ metadata.gz: fe24234c734d1ac32d22f1a3673d294b3321c0d6a60eae06c6df5eb1dbab07c88833a4ecdbcfb2551528f083952830841c11d183d788765eac0c055f5fbabb22
7
+ data.tar.gz: 2d84cb51332baa0ef70a1556ff8afadfa0207ee817d26abab9b4e5facb301292e4dcfad77d8ed82cb7b152c937b73ab3c4aef633670e1665448ce43268d64bad
@@ -0,0 +1,20 @@
1
+ class Tramway::Core::ExtendableForm
2
+ class << self
3
+ def new(name, *more_properties)
4
+ Object.const_set(name, Class.new(::Tramway::Core::ApplicationForm) do
5
+ more_properties.each do |property|
6
+
7
+ define_method property do
8
+ model.values[property] if model.values
9
+ end
10
+
11
+ define_method "#{property}=" do |value|
12
+ model.values ||= {}
13
+ model.values.merge! property => value
14
+ end
15
+
16
+ end
17
+ end)
18
+ end
19
+ end
20
+ end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Core
3
- VERSION = '1.0.6'
3
+ VERSION = '1.1.0'
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.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-21 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reform-rails
@@ -223,6 +223,7 @@ files:
223
223
  - app/decorators/tramway/core/application_decorated_collection.rb
224
224
  - app/decorators/tramway/core/application_decorator.rb
225
225
  - app/forms/tramway/core/application_form.rb
226
+ - app/forms/tramway/core/extendable_form.rb
226
227
  - app/models/tramway/core/application_record.rb
227
228
  - app/uploaders/application_uploader.rb
228
229
  - app/uploaders/file_uploader.rb