uploader 3.1.1 → 3.1.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.
@@ -70,8 +70,8 @@ Create an 'Upload' model in upload.rb.
70
70
  # the user has permission to delete the object. Add additional logic as needed or if the existing logic
71
71
  # looks fine then feel free to delete this comment and the can_edit? method.
72
72
  def can_edit?(check_user)
73
- return false if user.blank?
74
- check_user == self.user
73
+ return false if check_user.blank?
74
+ check_user == self.creator
75
75
  end
76
76
 
77
77
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.1
1
+ 3.1.2
@@ -92,7 +92,11 @@ class Uploader::UploadsController < ApplicationController
92
92
  format.js { render :text => message }
93
93
  format.json do
94
94
  if Uploader.configuration.use_http_status_failures
95
- render :json => message, :status => :unprocessable_entity
95
+ if success
96
+ render :json => message
97
+ else
98
+ render :json => message, :status => :unprocessable_entity
99
+ end
96
100
  else
97
101
  render :json => { :success => success, :message => message }
98
102
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{uploader}
8
- s.version = "3.1.1"
8
+ s.version = "3.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin", "David South"]
12
- s.date = %q{2011-09-17}
12
+ s.date = %q{2011-09-19}
13
13
  s.description = %q{Uploader gem that makes it simple add multiple file uploads to your Rails project using SWFUpload, Uploadify and Paperclip}
14
14
  s.email = %q{justinball@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uploader
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 1
9
- - 1
10
- version: 3.1.1
9
+ - 2
10
+ version: 3.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-09-17 00:00:00 -06:00
20
+ date: 2011-09-19 00:00:00 -06:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency