muck-users 3.2.14 → 3.2.15
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/muck/users_controller.rb +21 -24
- data/muck-users.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.2.
|
1
|
+
3.2.15
|
@@ -184,34 +184,31 @@ class Muck::UsersController < ApplicationController
|
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
187
|
+
# override to customize the json generated for the user
|
188
|
+
def standard_user_json
|
189
|
+
@user.as_json
|
190
|
+
end
|
191
|
+
|
192
|
+
def standard_response(template, success = true, failure_path = '')
|
193
|
+
respond_to do |format|
|
194
|
+
format.html do
|
195
|
+
if success
|
196
|
+
render :template => "users/#{template}"
|
197
|
+
else
|
198
|
+
redirect_to failure_path
|
198
199
|
end
|
199
200
|
end
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
render :json => @user, :status => :unprocessable_entity
|
207
|
-
else
|
208
|
-
render :json => { :success => false, :user => @user.as_json }
|
209
|
-
end
|
201
|
+
format.xml { render :xml => @user }
|
202
|
+
format.json do
|
203
|
+
if MuckUsers.configuration.use_http_status_failures
|
204
|
+
render :json => standard_user_json, :status => success ? :ok : :unprocessable_entity
|
205
|
+
else
|
206
|
+
render :json => { :success => success, :user => standard_user_json }
|
210
207
|
end
|
211
|
-
end
|
212
|
-
end
|
208
|
+
end
|
209
|
+
end
|
213
210
|
end
|
214
|
-
|
211
|
+
|
215
212
|
def after_create_response(success, local_uri = '')
|
216
213
|
if success
|
217
214
|
respond_to do |format|
|
data/muck-users.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "muck-users"
|
8
|
-
s.version = "3.2.
|
8
|
+
s.version = "3.2.15"
|
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"]
|
12
|
-
s.date = "2011-09-
|
12
|
+
s.date = "2011-09-22"
|
13
13
|
s.description = "Easily add user signup, login and other features to your application"
|
14
14
|
s.email = "justin@tatemae.com"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-users
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 3.2.
|
9
|
+
- 15
|
10
|
+
version: 3.2.15
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Ball
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-09-
|
19
|
+
date: 2011-09-22 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|