glebtv-rails-uploader 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,10 +1,32 @@
1
- # this fork adds mongoid support
1
+ # this fork adds mongoid and rails_admin support
2
2
 
3
3
  This fork works when both simple form and formtastic are loaded
4
4
 
5
- Also nested associations seem to be working
5
+ Also nested associations are working
6
6
 
7
- a little howto for mongoid / carrierwave:
7
+ # HTML5 File uploader for rails
8
+
9
+ This gem use https://github.com/blueimp/jQuery-File-Upload for upload files.
10
+
11
+ Preview:
12
+
13
+ ![Uploader in use](http://img39.imageshack.us/img39/2206/railsuploader.png)
14
+
15
+
16
+ ## Install
17
+
18
+ In Gemfile:
19
+ ``` ruby
20
+ gem "glebtv-rails-uploader"
21
+ ```
22
+
23
+ In routes:
24
+
25
+ ``` ruby
26
+ mount Uploader::Engine => '/uploader'
27
+ ```
28
+
29
+ ## HowTo for mongoid / carrierwave:
8
30
 
9
31
  ### Asset Parent Model (common)
10
32
  ``` ruby
@@ -113,27 +135,7 @@ end
113
135
  end
114
136
  ```
115
137
 
116
- # HTML5 File uploader for rails
117
-
118
- This gem use https://github.com/blueimp/jQuery-File-Upload for upload files.
119
-
120
- Preview:
121
-
122
- ![Uploader in use](http://img39.imageshack.us/img39/2206/railsuploader.png)
123
-
124
- ## Install
125
-
126
- In Gemfile:
127
-
128
- gem "glebtv-rails-uploader", require: 'rails-uploader'
129
-
130
- In routes:
131
-
132
- ``` ruby
133
- mount Uploader::Engine => '/uploader'
134
- ```
135
-
136
- ## Usage
138
+ ## Usage (Original description)
137
139
 
138
140
  Architecture to store uploaded files (cancan integration):
139
141
 
@@ -49,7 +49,7 @@ module Uploader
49
49
  end
50
50
 
51
51
  def values
52
- if !value.nil? && value.first.respond_to?(:sort)
52
+ if !value.nil? && value.respond_to?(:first) && value.first.respond_to?(:sort)
53
53
  Array.wrap(value).sort_by(&:sort)
54
54
  else
55
55
  Array.wrap(value)
@@ -1,3 +1,3 @@
1
1
  module Uploader
2
- VERSION = "0.1.2".freeze
2
+ VERSION = "0.1.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glebtv-rails-uploader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  requirements: []
270
270
  rubyforge_project: rails-uploader
271
- rubygems_version: 1.8.22
271
+ rubygems_version: 1.8.25
272
272
  signing_key:
273
273
  specification_version: 3
274
274
  summary: Rails file upload implementation with jQuery-File-Upload
@@ -314,4 +314,3 @@ test_files:
314
314
  - spec/spec_helper.rb
315
315
  - spec/uploader_spec.rb
316
316
  - spec/fileuploads_spec.rb
317
- has_rdoc: