tramway-admin 1.11.2 → 1.12

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: 6a31499a7c42369723b4186f89bde96d8aefd569c3a8648ced5b1deae88eebaf
4
- data.tar.gz: 22599f9b8a0ac187169c99e420cb9d3089eaf7e2a1d44c871937507cedfdab65
3
+ metadata.gz: a503c8ac204e6d2d36cbbe4168b72f0ce843fc744cda0c6fb3106082de4cc701
4
+ data.tar.gz: 76a0541f594c9a3eb2a22cfd3f500a0674af4f8bf54219538716ccc7fda2e999
5
5
  SHA512:
6
- metadata.gz: f27f92268be367bfea3d906927e126a76d4b55df24d187d74ce2f45d08444ae2fa28c612cf71411452218cde7ef542d3a353f614a9a727cbc871e941bba568be
7
- data.tar.gz: 8ba227bc177d84069348dd849113bc6e869a75ee944849637b7e9323f6b35584a40541f0e75203aa0b313f55404a93005f85cdbf764b2eab3952ba16f3d80d10
6
+ metadata.gz: 77d5cb62cdf5700b915c0c8c870290f47c236d5bcbb4889effc7db5f4db3df0d8f9deb552a582bf0fc192ac9a3c98deef5afbd97a2bb7d0f80853ff5e8ddcffe
7
+ data.tar.gz: cf97934893fec436f5ade4751f8049738d94b40bf466bdd8621e68abf103a07da8400a476ac4efdc65cc71bd78e6920841c49bfdeb1dae46242b0d85e3002290
@@ -17,6 +17,10 @@ module Tramway::Admin
17
17
  records_path args, options.merge(model: params[:model])
18
18
  end
19
19
 
20
+ def public_path(record)
21
+ record.public_path || try("#{record.class.name.underscore.gsub('/', '_')}_path", record)
22
+ end
23
+
20
24
  def model_class
21
25
  params[:model].constantize
22
26
  end
@@ -13,6 +13,8 @@
13
13
  = current_title
14
14
  - edit_path = object_type(object) == :singleton ? edit_current_model_singleton_path : edit_current_model_record_path(object.id)
15
15
  = link_to fa_icon(:pencil), edit_path, class: 'btn btn-warning btn-xs'
16
+ - if public_path(object)
17
+ = link_to fa_icon(:share), public_path(object), class: 'btn btn-primary btn-xs'
16
18
  %hr
17
19
  .row
18
20
  %table.table.table-striped.table-bordered
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Admin
3
- VERSION = '1.11.2'
3
+ VERSION = '1.12'
4
4
  end
5
5
  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: 1.11.2
4
+ version: '1.12'
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-04-10 00:00:00.000000000 Z
11
+ date: 2019-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views