administrate-field-paperclip 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/administrate-field-paperclip.gemspec +1 -1
- data/app/views/fields/{paperclip_field → paperclip}/_form.html.erb +0 -0
- data/app/views/fields/{paperclip_field → paperclip}/_index.html.erb +0 -0
- data/app/views/fields/{paperclip_field → paperclip}/_show.html.erb +0 -0
- data/lib/administrate/field/paperclip.rb +1 -1
- data/spec/paperclip_spec.rb +14 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee16d28996faaddc47f31c7a8c5f817d46dd114a
|
4
|
+
data.tar.gz: 44f9346ebf5c4e3684c84aa057ddc36d084af810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7db40f29e4215404bf99062c401e1c23c76c1649f50cfbf83f3967476a65660631bd6948afd028119dbb76507c2b93a3dcf3670458fa5742fae69f4ec8919826
|
7
|
+
data.tar.gz: 5bc6bc633197f93dae28a596574d7d58d6028be0e37cd005d4f74ae91307e0b9b83a199b3299b3421c7b3301898b7a4e2597b35c1d059dade0c5215397f06c4e
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ $ bundle install
|
|
19
19
|
|
20
20
|
Follow the [instructions on Paperclip](https://github.com/thoughtbot/paperclip#quick-start) to get started with your models and migrations. Once you've added the Paperclip attribute to your models, edit your Administrate dashboards. If you added 'avatar' to 'User', then you should:
|
21
21
|
|
22
|
-
* Add `avatar: Field::
|
22
|
+
* Add `avatar: Field::Paperclip` to `ATTRIBUTE_TYPES`.
|
23
23
|
* Add `:avatar` to `FORM_ATTRIBUTES`, `SHOW_PAGE_ATTRIBUTES` and (optionally) `COLLECTION_ATTRIBUTES`.
|
24
24
|
|
25
25
|
Based on the [Administrate::Field::Image](https://github.com/thoughtbot/administrate-field-image) template.
|
@@ -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-paperclip'
|
5
|
-
gem.version = '0.0.
|
5
|
+
gem.version = '0.0.2'
|
6
6
|
gem.authors = ['Fernando Briano']
|
7
7
|
gem.email = ['fernando@picandocodigo.net']
|
8
8
|
gem.homepage = 'https://github.com/picandocodigo/administrate-field-paperclip'
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "administrate/field/paperclip"
|
2
|
+
|
3
|
+
describe Administrate::Field::Paperclip do
|
4
|
+
describe '#to_partial_path' do
|
5
|
+
it 'returns a partial based on the page being rendered' do
|
6
|
+
page = :show
|
7
|
+
field = Administrate::Field::Paperclip.new(:paperclip, '/a.jpg', page)
|
8
|
+
|
9
|
+
path = field.to_partial_path
|
10
|
+
|
11
|
+
expect(path).to eq("/fields/paperclip/#{page}")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-field-paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Briano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -65,10 +65,11 @@ files:
|
|
65
65
|
- README.md
|
66
66
|
- Rakefile
|
67
67
|
- administrate-field-paperclip.gemspec
|
68
|
-
- app/views/fields/
|
69
|
-
- app/views/fields/
|
70
|
-
- app/views/fields/
|
68
|
+
- app/views/fields/paperclip/_form.html.erb
|
69
|
+
- app/views/fields/paperclip/_index.html.erb
|
70
|
+
- app/views/fields/paperclip/_show.html.erb
|
71
71
|
- lib/administrate/field/paperclip.rb
|
72
|
+
- spec/paperclip_spec.rb
|
72
73
|
homepage: https://github.com/picandocodigo/administrate-field-paperclip
|
73
74
|
licenses:
|
74
75
|
- MIT
|