refile-input 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 +2 -2
- data/lib/inputs/refile_input.rb +1 -1
- data/refile-input.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37f9d3b46444c07b227349ce8d4db54e490ef552
|
|
4
|
+
data.tar.gz: 30e6342d9ea02a0b1b245529bdf70c1f1d2ebc43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eac8b70ddafd2ab809f51759949292f9753ec5d0600c6e523625020b14b39e9aac29e832cb663fce807bb7bbdef169261441cbb9462409ee2e37039a7affc217
|
|
7
|
+
data.tar.gz: f4afc98e7998aa4f53e3eee56b4466aca4549fa3dccfacd3da3589caa8396a25cec823a103cf9527c9d8fadd5d2fa451115750a2432ac54b3bdfce8af717fcf4
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Refile Input gem adds custom input type to formtastic to use refile file uploade
|
|
|
7
7
|
Add the gem:
|
|
8
8
|
|
|
9
9
|
``` ruby
|
|
10
|
-
gem "
|
|
10
|
+
gem "refile-input", require: ["inputs/refile_input"]
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
Use the gem:
|
|
@@ -22,7 +22,7 @@ end
|
|
|
22
22
|
|
|
23
23
|
Gem brings support of the following options:
|
|
24
24
|
|
|
25
|
-
* `direct` determines whether file should be uploaded asynchronously or not. Uploading host might
|
|
25
|
+
* `direct` determines whether file should be uploaded asynchronously or not. Uploading host might be changed with `host` option. More about it read in refile [documentation](https://github.com/elabs/refile/). Note that refile's js should be included on the page.
|
|
26
26
|
* `image_preview` is an option to generate image preview. As arguments it accepts list of refile `attachment_url` options. Read more [here](https://github.com/elabs/refile/#4-rails-helpers).
|
|
27
27
|
* all formtastic's options such as `hint`, `label`, etc.
|
|
28
28
|
|
data/lib/inputs/refile_input.rb
CHANGED
|
@@ -48,6 +48,6 @@ class RefileInput < Formtastic::Inputs::FileInput
|
|
|
48
48
|
refile_app_path = Rails.application.routes.url_helpers.refile_app_path
|
|
49
49
|
url = Refile.attachment_url @object, method, *options, prefix: refile_app_path
|
|
50
50
|
|
|
51
|
-
template.image_tag
|
|
51
|
+
template.content_tag(:div, template.image_tag(url), class: 'image-preview')
|
|
52
52
|
end
|
|
53
53
|
end
|
data/refile-input.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'refile-input'
|
|
3
3
|
s.license = 'MIT'
|
|
4
|
-
s.version = '0.0.
|
|
4
|
+
s.version = '0.0.2'
|
|
5
5
|
s.authors = ["Petr Sergeev", "Sindre Moen"]
|
|
6
6
|
s.email = ["peter@hyper.no", "sindre@hyper.no"]
|
|
7
7
|
s.description = "This adds custom input to support refile file uploader to formtastic form builder"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: refile-input
|
|
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
|
- Petr Sergeev
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-03-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: formtastic
|