tramway-core 1.9.7 → 1.9.8
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: 430efd71ac7c88ad99e9f694e9a69275eae2547584aab8304398fa1107980a76
|
4
|
+
data.tar.gz: da4601abe1d6b27e79908646a9f966430e16b11d4ea720101700d1054efe879f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9639e164d342d2a783031a42573985f0f0c9af9877826c8f06c8b60acf7b95482372ea938cde6d2f56d91edef19e3bdf78fbb5cf7ba5eecceb58239bbac9d398
|
7
|
+
data.tar.gz: 5eeb8adc7c07a0d8a2f7df339c58be45f63ba74d68b1bc34ed08ccf4e5df2b76508b1403dfae7c1574360e647cc6aeaba215a076aa79bd3cf69a1ccbf4a284b6
|
@@ -82,13 +82,15 @@ class Tramway::Core::ApplicationDecorator
|
|
82
82
|
end.compact
|
83
83
|
end
|
84
84
|
|
85
|
+
include Tramway::Core::Concerns::AttributesDecoratorHelper
|
86
|
+
|
85
87
|
def attributes
|
86
88
|
object.attributes.reduce({}) do |hash, attribute|
|
87
89
|
value = try(attribute[0]) ? send(attribute[0]) : object.send(attribute[0])
|
88
90
|
if attribute[0].to_s.in? object.class.state_machines.keys.map(&:to_s)
|
89
|
-
hash.merge! attribute[0] => object
|
91
|
+
hash.merge! attribute[0] => state_machine_view(object, attribute[0])
|
90
92
|
elsif value.class.in? [ ActiveSupport::TimeWithZone, DateTime, Time ]
|
91
|
-
hash.merge! attribute[0] =>
|
93
|
+
hash.merge! attribute[0] => datetime_view(attribute[1])
|
92
94
|
elsif value.class.superclass == ApplicationUploader
|
93
95
|
tags = content_tag(:div) do
|
94
96
|
if value.url.match(/jpg|JPG|png|PNG$/)
|
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.9.
|
4
|
+
version: 1.9.8
|
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-03
|
11
|
+
date: 2019-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reform-rails
|
@@ -339,6 +339,7 @@ files:
|
|
339
339
|
- app/controllers/tramway/core/application_controller.rb
|
340
340
|
- app/decorators/tramway/core/application_decorated_collection.rb
|
341
341
|
- app/decorators/tramway/core/application_decorator.rb
|
342
|
+
- app/decorators/tramway/core/concerns/attributes_decorator_helper.rb
|
342
343
|
- app/forms/tramway/core/application_form.rb
|
343
344
|
- app/forms/tramway/core/extendable_form.rb
|
344
345
|
- app/forms/tramway/core/form_creator.rb
|