tramway-core 1.11 → 1.11.1
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: 3348ffc445ecc81aad1ca01f307174a84d0952c6a399aa261b5cf15a92a1c99a
|
4
|
+
data.tar.gz: 17aa3f015b0b0b405317abe2496980ccbb736439ba312e69609782fd6f9281b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b605c1f468816a86c3b8934deec966fe065a1d9bd422838fd5a93c4f7ae1759b244ac019853756a5821d678d7199aa41aedfe0984a5a11b056cedd7432d8b823
|
7
|
+
data.tar.gz: 9769196d88397cb81bf2c7562ff69259e2328eb9cda0a9d2d3a4112f229265f51c850f71382350a648370c2d6f2dc7959a01d4b8c5e436614810dc1354bfd86f
|
@@ -13,8 +13,13 @@ module Tramway::Core::Concerns::AttributesDecoratorHelper
|
|
13
13
|
|
14
14
|
def image_view(value)
|
15
15
|
content_tag(:div) do
|
16
|
-
|
17
|
-
|
16
|
+
begin
|
17
|
+
if value.url.match(/jpg|JPG|png|PNG$/)
|
18
|
+
concat image_tag value.try(:small) ? value.small.url : value.url
|
19
|
+
end
|
20
|
+
rescue NoMethodError => e
|
21
|
+
error = Tramway::Error.new plugin: :core, method: :image_view, message: e.name == :url ? 'You should mount PhotoUploader to your model. Just add `mount_uploader #{attribute_name}, PhotoUploader` to your model' : e.message
|
22
|
+
raise error.message
|
18
23
|
end
|
19
24
|
concat link_to(fa_icon(:download), value.url, class: 'btn btn-success')
|
20
25
|
end
|
@@ -6,7 +6,7 @@ module Tramway
|
|
6
6
|
title_text = "#{page_title} | #{@application.try(:title) || @application.public_name}"
|
7
7
|
content_for(:title) { title_text }
|
8
8
|
else
|
9
|
-
error = Tramway::Error.new(plugin: :core, method: :title, message: ('You should set Tramway::Core::Application class using `::Tramway::Core.initialize_application model_class: #{model_class_name}` in config/initializers/tramway.rb'))
|
9
|
+
error = Tramway::Error.new(plugin: :core, method: :title, message: ('You should set Tramway::Core::Application class using `::Tramway::Core.initialize_application model_class: #{model_class_name}` in config/initializers/tramway.rb OR may be you don\'t have any records of application model'))
|
10
10
|
raise error.message
|
11
11
|
end
|
12
12
|
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:
|
4
|
+
version: 1.11.1
|
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-
|
11
|
+
date: 2019-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reform-rails
|
@@ -396,7 +396,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
396
396
|
version: '0'
|
397
397
|
requirements: []
|
398
398
|
rubyforge_project:
|
399
|
-
rubygems_version: 2.7.
|
399
|
+
rubygems_version: 2.7.6
|
400
400
|
signing_key:
|
401
401
|
specification_version: 4
|
402
402
|
summary: Core for all Tramway Rails Engines
|