tramway-core 4.1 → 4.1.3

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: f634b186e0094a985e359e2a5db0d7592a02ac672a533ef6e015afb54c26d827
4
- data.tar.gz: d2988cbec5207fdcc89e9f5c51a0c7f9e74c440e9b0212f966428b9ad12cf9c0
3
+ metadata.gz: 6c84e09b4acb7d9593eea58e775c5df69cd5ab2c441bf65f3a1e42667bad071d
4
+ data.tar.gz: e80ee805784db8ab7b545025060a41650e0b30d8e3d02e32953346d6da1ad955
5
5
  SHA512:
6
- metadata.gz: 5f6f5c885690572f69a841bef125dcef60046c7b4756e24b9fd1cf1b761977e3a89df137257d3dd9d5d505f834f0f443c823640563ee06100c22a0f2356facbf
7
- data.tar.gz: c4f0e2dddf630c3fb370c2b4b4f58836296f39b54745a933c4accab995ad7ff269ba321e2b5235259f439f7c29f440aa463b346b1eb35928cd2f630de7ee0243
6
+ metadata.gz: 8ca4dfb010df866f974e45165428505763c9840194e70bd2f4e0a49e9bb015f5e56aa592d3444109c78994423a6562064481e4c26fa755b9b39d842e73745643
7
+ data.tar.gz: 85f72f24a12cf2a62860dc5636e91a67e230962da4c08828d644a8e509a7f20ea54293fd30de10e2fb3cf4d6d4298887636cb5c8028bcd6cff47c441adcb45d7
@@ -10,6 +10,7 @@ class Tramway::Core::ApplicationDecorator
10
10
  include ::Tramway::Core::CopyToClipboardHelper
11
11
  include ::Tramway::Core::Associations::ObjectHelper
12
12
  include ::Tramway::Core::Attributes::ViewHelper
13
+ include ::Tramway::Core::Concerns::TableBuilder
13
14
  include ::Tramway::ClassNameHelpers
14
15
 
15
16
  def initialize(object)
@@ -38,6 +39,10 @@ class Tramway::Core::ApplicationDecorator
38
39
  Haml::Engine.new(File.read"#{Rails.root}/app/views/#{view_name}.html.haml").render(self, locals)
39
40
  end
40
41
 
42
+ def listed_state_machines
43
+ nil
44
+ end
45
+
41
46
  delegate :id, to: :object
42
47
  delegate :human_state_name, to: :object
43
48
 
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tramway::Core::Concerns::TableBuilder
4
+ def table(**options, &block)
5
+ content_tag(:table, class: 'table table-bordered table-striped', **options) do
6
+ yield if block
7
+ end
8
+ end
9
+
10
+ def thead(**options, &block)
11
+ content_tag(:thead, **options) do
12
+ yield if block
13
+ end
14
+ end
15
+
16
+ def th(**options, &block)
17
+ content_tag(:th, **options) do
18
+ yield if block
19
+ end
20
+ end
21
+
22
+ def td(**options, &block)
23
+ content_tag(:td, **options) do
24
+ yield if block
25
+ end
26
+ end
27
+
28
+ def tr(**options, &block)
29
+ content_tag(:tr, **options) do
30
+ yield if block
31
+ end
32
+ end
33
+ end
@@ -23,7 +23,6 @@ class Tramway::Core::ApplicationRecord < ActiveRecord::Base
23
23
  end
24
24
  end
25
25
 
26
-
27
26
  include ::PgSearch::Model
28
27
 
29
28
  def creator
@@ -43,7 +42,7 @@ class Tramway::Core::ApplicationRecord < ActiveRecord::Base
43
42
  end
44
43
 
45
44
  def search_by(*attributes, **associations)
46
- pg_search_scope :full_text_search, against: attributes, associated_against: associations
45
+ pg_search_scope :full_text_search, against: attributes, associated_against: associations, using: [:tsearch, :trigram]
47
46
  end
48
47
 
49
48
  def uploader(attribute_name, uploader_name, **options)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Core
5
- VERSION = '4.1'
5
+ VERSION = '4.1.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: '4.1'
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-14 00:00:00.000000000 Z
12
+ date: 2022-06-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: audited
@@ -161,22 +161,22 @@ dependencies:
161
161
  name: mini_magick
162
162
  requirement: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: 4.8.0
167
164
  - - "~>"
168
165
  - !ruby/object:Gem::Version
169
166
  version: '4.8'
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: 4.8.0
170
170
  type: :runtime
171
171
  prerelease: false
172
172
  version_requirements: !ruby/object:Gem::Requirement
173
173
  requirements:
174
- - - ">="
175
- - !ruby/object:Gem::Version
176
- version: 4.8.0
177
174
  - - "~>"
178
175
  - !ruby/object:Gem::Version
179
176
  version: '4.8'
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: 4.8.0
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: pg_search
182
182
  requirement: !ruby/object:Gem::Requirement
@@ -320,6 +320,7 @@ files:
320
320
  - app/decorators/tramway/core/associations/object_helper.rb
321
321
  - app/decorators/tramway/core/attributes/view_helper.rb
322
322
  - app/decorators/tramway/core/concerns/attributes_decorator_helper.rb
323
+ - app/decorators/tramway/core/concerns/table_builder.rb
323
324
  - app/decorators/tramway/core/delegating/class_helper.rb
324
325
  - app/forms/tramway/core/application_form.rb
325
326
  - app/forms/tramway/core/application_forms/association_class_helpers.rb
@@ -413,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
413
414
  - !ruby/object:Gem::Version
414
415
  version: '0'
415
416
  requirements: []
416
- rubygems_version: 3.0.3.1
417
+ rubygems_version: 3.1.6
417
418
  signing_key:
418
419
  specification_version: 4
419
420
  summary: Core for all Tramway Rails Engines