tramway-admin 2.1.3.2 → 2.1.3.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: 80721c33dfdeba8fa169d9b695539daa6d60815a75108a1321c8942136e3a3ee
4
- data.tar.gz: d4f17bcedd4cfe6113e6ef600d657a7f6761f38e6c9a766047c627aa6238f4ca
3
+ metadata.gz: dcf7895786074971f30f08a973c8bc290a533faff676f5ecc65c444076d7f397
4
+ data.tar.gz: 0d445fbf425502399899e0d66be21acb78ee0f673ec06abb94d7f2743a29e239
5
5
  SHA512:
6
- metadata.gz: f75e4b1819128e66cb47c93e103aabd9e829c1741004c79fdaf56db6f5bf0b959e63f7d93a665e854c82080047e40658dd5d2bc4474513f82d89eae2768b132e
7
- data.tar.gz: 7a88d91517c5d3ee316b110ff4c14b82811cc68efaaaca61623f4008c51928bf96c7249048007c332b9a1ebd4764659ba821bc9e5e8fd7034e9cf5f1234a8b7c
6
+ metadata.gz: 9d2619f6ab1f3eef6bc2a330f0dd17f91272fad60c478a07329892fd986bcd13c38bfd5312c69576df533946fca4f20219857ac34a68e8b87aa72e8bebb989f4
7
+ data.tar.gz: b1bb886e6bb88028d7665b545c3b8c1550398e19c585cda994e7863a10eeb45dff197837b2a2b5137a5189c47c60103e063695918880adaad097766f1cf8d48d
data/README.md CHANGED
@@ -541,7 +541,8 @@ class YourModelDecorator < Tramway::Core::ApplicationDecorator
541
541
  inner: lambda do # inner HTML you want to see in the button
542
542
  fa_icon 'file-excel'
543
543
  end,
544
- color: :success # bootstrap button color
544
+ color: :success, # bootstrap button color
545
+ method: :get # HTTP method. get method is a default. Available: :post, :patch: delete
545
546
  }
546
547
  ]
547
548
  }
@@ -8,7 +8,7 @@
8
8
  = hidden_field_tag :model, params[:model]
9
9
  = hidden_field_tag :scope, params[:scope]
10
10
  = hidden_field_tag :filter, (params[:filter].is_a?(ActionController::Parameters) ? params[:filter].permit!.to_h.to_json : params[:filter])
11
- - decorator_class(model_class).list_filters.each_slice(3) do |slice|
11
+ - decorator_class(model_class).list_filters&.each_slice(3) do |slice|
12
12
  .row-fluid.filters
13
13
  - slice.each do |filter|
14
14
  - case filter[1][:type]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '2.1.3.2'
5
+ VERSION = '2.1.3.3'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3.2
4
+ version: 2.1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-03 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tramway-core
@@ -305,7 +305,6 @@ files:
305
305
  - lib/tramway/admin/generators/templates/form.rb.erb
306
306
  - lib/tramway/admin/navbar.rb
307
307
  - lib/tramway/admin/notifications.rb
308
- - lib/tramway/admin/preview.rb
309
308
  - lib/tramway/admin/record_routes_helper.rb
310
309
  - lib/tramway/admin/records_models.rb
311
310
  - lib/tramway/admin/singleton_models.rb
@@ -331,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
331
330
  - !ruby/object:Gem::Version
332
331
  version: '0'
333
332
  requirements: []
334
- rubygems_version: 3.1.6
333
+ rubygems_version: 3.1.2
335
334
  signing_key:
336
335
  specification_version: 4
337
336
  summary: Engine for admin
@@ -1,15 +0,0 @@
1
- module Tramway::Admin::Preview
2
- def set_previewable_models(*models)
3
- @previewable_models ||= []
4
- @previewable_models += models.map(&:to_s)
5
- end
6
-
7
- def previewable_models
8
- @previewable_models
9
- end
10
-
11
- def is_available_to_preview?(model_class)
12
- @previewable_models ||= []
13
- @previewable_models.include? model_class.to_s
14
- end
15
- end