devise_invitable 0.5.3 → 0.5.4

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.

Potentially problematic release.


This version of devise_invitable might be problematic. Click here for more details.

data/README.rdoc CHANGED
@@ -153,7 +153,7 @@ To accept an invitation with a token use the <tt>accept_invitation!</tt> class m
153
153
  Since the invitations controller take care of all the creation/acceptation of an invitation, in most cases you wouldn't call the <tt>invite!</tt> and <tt>accept_invitation!</tt> methods directly.
154
154
  Instead, in your views, put a link to <tt>new_user_invitation_path</tt> or <tt>new_invitation_path(:user)</tt> or even <tt>/users/invitation/new</tt> to prepare and send an invitation (to a user in this example).
155
155
 
156
- After an invitation is created and sent, the inviter will be redirected to after_sign_in_path_for(resource_name).
156
+ After an invitation is created and sent, the inviter will be redirected to after_invite_path_for(resource_name), which is stored path or the same path as after_sign_in_path_for by default.
157
157
 
158
158
  After an invitation is accepted, the invitee will be redirected to after_accept_path_for(resource), which is the same path as after_sign_in_path_for by default. If you want to override the path, override invitations controller and define after_accept_path_for method. This is useful in the common case that a user is invited to a specific location in your application. More on {Devise's README}[http://github.com/plataformatec/devise], "Controller filters and helpers" section.
159
159
 
@@ -18,7 +18,7 @@ class Devise::InvitationsController < ApplicationController
18
18
 
19
19
  if resource.errors.empty?
20
20
  set_flash_message :notice, :send_instructions, :email => self.resource.email
21
- respond_with resource, :location => redirect_location(resource_name, resource)
21
+ respond_with resource, :location => after_invite_path_for(resource)
22
22
  else
23
23
  respond_with_navigational(resource) { render_with_scope :new }
24
24
  end
@@ -60,6 +60,10 @@ class Devise::InvitationsController < ApplicationController
60
60
  end
61
61
  end
62
62
 
63
+ def after_invite_path_for(resource)
64
+ redirect_location(resource_name, resource)
65
+ end
66
+
63
67
  def after_accept_path_for(resource)
64
68
  after_sign_in_path_for(resource)
65
69
  end
@@ -1,3 +1,3 @@
1
1
  module DeviseInvitable
2
- VERSION = '0.5.3'
2
+ VERSION = '0.5.4'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devise_invitable
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 3
10
- version: 0.5.3
9
+ - 4
10
+ version: 0.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Cambra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-22 00:00:00 +02:00
18
+ date: 2011-07-27 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency