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 +4 -4
- data/.gitignore +1 -0
- data/README.md +11 -0
- data/administrate-field-active_storage.gemspec +1 -1
- data/app/views/fields/active_storage/_index.html.erb +3 -3
- data/contribute.md +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a03bf5b799062dc3d7a0cd5bcad267e90518bd7c
|
4
|
+
data.tar.gz: 749e085cbd3d513d23cf671d8e6478f1dc3de4e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11913bfee09c506047628d1335216f8e4fce372d7a6d874fb7c8e991fad3c8b562f11739cf486c68125aa770a4f4729cdfb81c5dbd62253826e108671e217827
|
7
|
+
data.tar.gz: c72aa48d56397ee6ee354db1cdae86bfbed5957660d0e7619db783c4f2c6ef806bf60b037b12294cb4a3307fbf578764e0a28297a04b8bda166f2c264edee5a6
|
data/.gitignore
CHANGED
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.
|
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', :
|
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', :
|
24
|
+
<%= render :partial => 'fields/active_storage/item', locals: { field: field, attachment: field.data } %>
|
25
25
|
<% end %>
|
26
|
-
<% end %>
|
26
|
+
<% end %>
|
data/contribute.md
CHANGED
@@ -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.
|
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-
|
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.
|
95
|
+
rubygems_version: 2.6.14.1
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
98
|
summary: Administrate fields for active storage
|