tramway-core 1.16.1.1 → 1.16.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7338b8f074bd608f2df2cbc5a375a32244088c869971717b2893bfd0d6d6d7bb
4
- data.tar.gz: ee31d9fb50b6e57162f2e33624ed7560a36f3b0254f76f21fd67a9f815419826
3
+ metadata.gz: a339fa00b0157935827d14e8e992b7509d2e46149cb5573a9b092a0025283c04
4
+ data.tar.gz: 27a7f7d35aad3c74fcf12ee2b6332d7b958bab6ffeb809f49ea734d4389c2bae
5
5
  SHA512:
6
- metadata.gz: 620061bc49ddca5425b1117ba685fa147de7cbc8ed3409d240f9d3288f730a17610f5567d7468bc23282962c5563773bff6530e9120f40da186a4889c6f8b8e0
7
- data.tar.gz: '064825fc0d377cb01afae81d07a5d5cfebc9706ea566076c7166b869883aa9c3bc450131f3a9df7498e0309d8a7665a0627d45cec4cc24e5eb8cbfdadea023af'
6
+ metadata.gz: d7ab089c503af5de848ed9802627ff1bb124a09bb23f06496de582d61764663cb0c320a29bd758e357dbebf21de5595ae5a2bf2090b32daa9363cd2b3341bf5c
7
+ data.tar.gz: 4a199e6e3347425c0ea1fef02eaf2a97ea54d115ab0972046cb2e981d0c22bdcc19ab699811997722cdc6b47353bb00883b3bf482deeb5692ee7af508d8cd5a6
@@ -1,6 +1,8 @@
1
1
  #= require jquery
2
2
  #= require jquery_ujs
3
+ #= require jquery3
3
4
  #= require popper
5
+ #= require bootstrap
4
6
  #= require bootstrap-datepicker-1.8.0
5
7
  #= require bootstrap-datepicker-1.8.0.ru.min
6
8
  #= require font_awesome5
@@ -16,7 +16,7 @@ module Tramway::Core::Concerns::AttributesDecoratorHelper
16
16
  def image_view(original, thumb: nil, filename: nil)
17
17
  if original.present?
18
18
  thumb ||= original.is_a?(CarrierWave::Uploader::Base) ? original.small : nil
19
- filename ||= original.is_a?(CarrierWave::Uploader::Base) ? original.path.split('/').last : nil
19
+ filename ||= original.is_a?(CarrierWave::Uploader::Base) ? original.path&.split('/')&.last : nil
20
20
  src_thumb = if thumb&.is_a?(CarrierWave::Uploader::Base)
21
21
  thumb.url
22
22
  elsif thumb&.match(%r{^(?:[a-zA-Z0-9+/]{4})*(?:|(?:[a-zA-Z0-9+/]{3}=)|(?:[a-zA-Z0-9+/]{2}==)|(?:[a-zA-Z0-9+/]{1}===))$})
@@ -54,7 +54,7 @@ class Tramway::Core::ExtendableForm
54
54
  validator_object = "#{pair[0].camelize}Validator".constantize.new(attributes: :not_blank)
55
55
  if pair[1] == 'true' && !validator_object.send(:valid?, value)
56
56
  model.errors.add property[0],
57
- I18n.t("activerecord.errors.models.#{model.class.name.underscore}.attributes.#{property[0]}.#{pair[0]}", value: value)
57
+ I18n.t("activerecord.errors.models.#{model.class.name.underscore}.attributes.default.#{pair[0]}", value: value)
58
58
  end
59
59
  end
60
60
  end
@@ -24,6 +24,10 @@ module Tramway
24
24
 
25
25
  include ::PgSearch::Model
26
26
 
27
+ def creator
28
+ audits.where(action: :create).first.user
29
+ end
30
+
27
31
  # FIXME: detect inhertited locales
28
32
  class << self
29
33
  def human_attribute_name(attribute_name, *_args)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '1.16.1.1'
5
+ VERSION = '1.16.1.6'
6
6
  end
7
7
  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.16.1.1
4
+ version: 1.16.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-31 00:00:00.000000000 Z
11
+ date: 2020-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: audited