muck-users 0.3.10 → 0.3.11

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.10
1
+ 0.3.11
@@ -55,7 +55,8 @@ class Muck::UserSessionsController < ApplicationController
55
55
  end
56
56
  end
57
57
 
58
- # override redirect by adding :redirect_to as a hidden field in your form or as a url param
58
+ # override redirect by adding a route like this:
59
+ # map.logout_complete '/login', :controller => 'user_session', :action => 'new'
59
60
  def after_destroy_response
60
61
  respond_to do |format|
61
62
  format.html { redirect_to logout_complete_path }
@@ -253,14 +253,11 @@ class Muck::UsersController < ApplicationController
253
253
  end
254
254
  end
255
255
 
256
- # override redirect by adding :redirect_to as a hidden field in your form or as a url param
257
- def after_update_response(success)
256
+ def after_update_response(success, success_redirect = nil)
258
257
  if success
259
258
  respond_to do |format|
260
259
  format.html do
261
- get_redirect_to do
262
- redirect_to admin? ? public_user_path(@user) : user_path(@user)
263
- end
260
+ redirect_to success_redirect || (admin? ? public_user_path(@user) : user_path(@user))
264
261
  end
265
262
  format.xml{ head :ok }
266
263
  end
@@ -273,14 +270,11 @@ class Muck::UsersController < ApplicationController
273
270
  end
274
271
  end
275
272
 
276
- # override redirect by adding :redirect_to as a hidden field in your form or as a url param
277
- def after_destroy_response
273
+ def after_destroy_response(success_redirect = nil)
278
274
  respond_to do |format|
279
275
  format.html do
280
276
  flash[:notice] = t('muck.users.login_out_success')
281
- get_redirect_to do
282
- redirect_to(login_url)
283
- end
277
+ redirect_to success_redirect || login_url
284
278
  end
285
279
  format.xml { head :ok }
286
280
  format.json { render :json => { :success => true } }
@@ -21,8 +21,6 @@
21
21
  <%= f.password_field :password_confirmation, { :label => t('muck.users.confirm_password'),
22
22
  :tip => t('muck.users.password_confirmation_help') } -%>
23
23
 
24
- <%= hidden_field_tag :redirect_to, redirect_to -%>
25
-
26
24
  <% if GlobalConfig.use_recaptcha -%>
27
25
  <div class="recaptcha">
28
26
  <%= recaptcha_tags %>
@@ -12,7 +12,6 @@
12
12
  <div class="button form-row">
13
13
  <%= f.submit t('muck.general.save') %>
14
14
  </div>
15
- <%= hidden_field_tag :redirect_to, edit_user_path(@user) %>
16
15
  <% end %>
17
16
 
18
17
  </div>
@@ -27,7 +26,6 @@
27
26
  <div class="button form-row">
28
27
  <%= submit_tag t('muck.users.change_password'), :class => 'button' %>
29
28
  </div>
30
- <%= hidden_field_tag :redirect_to, edit_user_path(@user) %>
31
29
  <% end -%>
32
30
  </div>
33
31
 
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{muck-users}
8
- s.version = "0.3.10"
8
+ s.version = "0.3.11"
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 = %q{2010-03-05}
12
+ s.date = %q{2010-03-18}
13
13
  s.description = %q{Easily add user signup, login and other features to your application}
14
14
  s.email = %q{justin@tatemae.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 10
9
- version: 0.3.10
8
+ - 11
9
+ version: 0.3.11
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Ball
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-03-05 00:00:00 -07:00
18
+ date: 2010-03-18 00:00:00 -06:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency