administrate-field-active_storage 0.1.1 → 0.1.2

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
  SHA1:
3
- metadata.gz: aa336e8650e210e4f08df6a0b32d57ddbe8144ac
4
- data.tar.gz: 248f5fcfdb3441164bdeac8a0e7b7d6340427c65
3
+ metadata.gz: a03bf5b799062dc3d7a0cd5bcad267e90518bd7c
4
+ data.tar.gz: 749e085cbd3d513d23cf671d8e6478f1dc3de4e2
5
5
  SHA512:
6
- metadata.gz: 4f761ce95580dc9ea93ec59c193510ede0367df1359e97269f891e7660857e113faca84e8151f509fa57cd95a5ed068eb72bf93dc5085736cd33204c27c90516
7
- data.tar.gz: 22b431bad7e7431734ef4aae904d2bd2b29ee411944fee524fd1d2d22e501f06d0854f8f55260bffd4b864ee90d9c1a6b84ffbf5cab18f5833a1855f5b6ceab5
6
+ metadata.gz: 11913bfee09c506047628d1335216f8e4fce372d7a6d874fb7c8e991fad3c8b562f11739cf486c68125aa770a4f4729cdfb81c5dbd62253826e108671e217827
7
+ data.tar.gz: c72aa48d56397ee6ee354db1cdae86bfbed5957660d0e7619db783c4f2c6ef806bf60b037b12294cb4a3307fbf578764e0a28297a04b8bda166f2c264edee5a6
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.gem
data/README.md CHANGED
@@ -53,6 +53,17 @@ class ModelDashboard < Administrate::BaseDashboard
53
53
  ```
54
54
  i know it is not ideal, if you have a workaround please submit a PR
55
55
 
56
+ ### url_only
57
+ only the following needs to change in order for the field to be url_only
58
+ ```ruby
59
+ class ModelDashboard < Administrate::BaseDashboard
60
+ ATTRIBUTE_TYPES = {
61
+ attachments: Field::ActiveStorage.with_options({url_only: true}),
62
+ # ...
63
+ }
64
+ # ...
65
+ end
66
+ ```
56
67
  ## Things To Do:
57
68
 
58
69
  - [x] upload single file
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "administrate-field-active_storage"
5
- gem.version = "0.1.1"
5
+ gem.version = "0.1.2"
6
6
  gem.authors = ["Hamad AlGhanim"]
7
7
  gem.email = ["hamadyalghanim@gmail.com"]
8
8
  gem.homepage = "https://github.com/Dreamersoul/administrate-field-active_storage"
@@ -17,10 +17,10 @@ By default, the attribute is rendered as an image tag.
17
17
  <% if field.attached? %>
18
18
  <% if field.many? %>
19
19
  <% field.attachments.each do |attachment| %>
20
- <%= render :partial => 'item', :field => field, :attachment => attachment %>
20
+ <%= render :partial => 'fields/active_storage/item', locals: { field: field, attachment: attachment } %>
21
21
  <br/>
22
22
  <% end %>
23
23
  <% else %>
24
- <%= render :partial => 'item', :field => field, :attachment => field.data %>
24
+ <%= render :partial => 'fields/active_storage/item', locals: { field: field, attachment: field.data } %>
25
25
  <% end %>
26
- <% end %>
26
+ <% end %>
@@ -0,0 +1 @@
1
+ Patrick Gleeson [@patrick-gleeson](https://github.com/patrick-gleeson)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate-field-active_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hamad AlGhanim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-07 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: administrate
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.6.11
95
+ rubygems_version: 2.6.14.1
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Administrate fields for active storage