devise_invitable 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/app/controllers/invitations_controller.rb +1 -0
- data/app/views/invitations/new.html.erb +2 -0
- data/devise_invitable.gemspec +17 -17
- data/lib/devise/models/invitable.rb +1 -2
- data/lib/devise_invitable.rb +1 -1
- metadata +16 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
@@ -3,6 +3,7 @@ class InvitationsController < ApplicationController
|
|
3
3
|
|
4
4
|
before_filter :authenticate_resource!, :only => [:new, :create]
|
5
5
|
before_filter :require_no_authentication, :only => [:edit, :update]
|
6
|
+
helper_method :after_sign_in_path_for
|
6
7
|
|
7
8
|
# GET /resource/invitation/new
|
8
9
|
def new
|
data/devise_invitable.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{devise_invitable}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Sergio Cambra"]
|
12
|
-
s.date = %q{2009-12-
|
12
|
+
s.date = %q{2009-12-11}
|
13
13
|
s.description = %q{It adds support for send invitations by email (it requires to be authenticated) and accept the invitation setting the password}
|
14
14
|
s.email = %q{sergio@entrecables.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -72,31 +72,31 @@ Gem::Specification.new do |s|
|
|
72
72
|
s.rubygems_version = %q{1.3.5}
|
73
73
|
s.summary = %q{An invitation strategy for devise}
|
74
74
|
s.test_files = [
|
75
|
-
"test/
|
75
|
+
"test/integration/invitable_test.rb",
|
76
76
|
"test/integration_tests_helper.rb",
|
77
|
-
"test/models_test.rb",
|
78
77
|
"test/mailers/invitation_test.rb",
|
79
|
-
"test/
|
80
|
-
"test/integration/invitable_test.rb",
|
78
|
+
"test/model_tests_helper.rb",
|
81
79
|
"test/models/invitable_test.rb",
|
82
|
-
"test/
|
83
|
-
"test/rails_app/app/controllers/application_controller.rb",
|
80
|
+
"test/models_test.rb",
|
84
81
|
"test/rails_app/app/controllers/admins_controller.rb",
|
82
|
+
"test/rails_app/app/controllers/application_controller.rb",
|
85
83
|
"test/rails_app/app/controllers/home_controller.rb",
|
86
84
|
"test/rails_app/app/controllers/users_controller.rb",
|
87
|
-
"test/rails_app/app/models/user.rb",
|
88
85
|
"test/rails_app/app/helpers/application_helper.rb",
|
89
|
-
"test/rails_app/
|
86
|
+
"test/rails_app/app/models/user.rb",
|
87
|
+
"test/rails_app/config/boot.rb",
|
88
|
+
"test/rails_app/config/environment.rb",
|
89
|
+
"test/rails_app/config/environments/development.rb",
|
90
|
+
"test/rails_app/config/environments/production.rb",
|
91
|
+
"test/rails_app/config/environments/test.rb",
|
90
92
|
"test/rails_app/config/initializers/backtrace_silencers.rb",
|
93
|
+
"test/rails_app/config/initializers/inflections.rb",
|
91
94
|
"test/rails_app/config/initializers/new_rails_defaults.rb",
|
92
95
|
"test/rails_app/config/initializers/session_store.rb",
|
93
|
-
"test/rails_app/config/
|
94
|
-
"test/rails_app/
|
95
|
-
"test/
|
96
|
-
"test/
|
97
|
-
"test/rails_app/config/environment.rb",
|
98
|
-
"test/rails_app/config/boot.rb",
|
99
|
-
"test/rails_app/vendor/plugins/devise_invitable/init.rb"
|
96
|
+
"test/rails_app/config/routes.rb",
|
97
|
+
"test/rails_app/vendor/plugins/devise_invitable/init.rb",
|
98
|
+
"test/routes_test.rb",
|
99
|
+
"test/test_helper.rb"
|
100
100
|
]
|
101
101
|
|
102
102
|
if s.respond_to? :specification_version then
|
@@ -129,8 +129,7 @@ module Devise
|
|
129
129
|
invitable = find_or_initialize_with_error_by(:invitation_token, attributes[:invitation_token])
|
130
130
|
invitable.errors.add(:invitation_token, :invalid) if attributes[:invitation_token] && !invitable.new_record? && !invitable.valid_invitation?
|
131
131
|
if invitable.errors.empty?
|
132
|
-
invitable.
|
133
|
-
invitable.password_confirmation = attributes[:password_confirmation]
|
132
|
+
invitable.attributes = attributes
|
134
133
|
invitable.accept_invitation! if invitable.valid?
|
135
134
|
end
|
136
135
|
invitable
|
data/lib/devise_invitable.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_invitable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Cambra
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-11 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -129,28 +129,28 @@ signing_key:
|
|
129
129
|
specification_version: 3
|
130
130
|
summary: An invitation strategy for devise
|
131
131
|
test_files:
|
132
|
-
- test/
|
132
|
+
- test/integration/invitable_test.rb
|
133
133
|
- test/integration_tests_helper.rb
|
134
|
-
- test/models_test.rb
|
135
134
|
- test/mailers/invitation_test.rb
|
136
|
-
- test/
|
137
|
-
- test/integration/invitable_test.rb
|
135
|
+
- test/model_tests_helper.rb
|
138
136
|
- test/models/invitable_test.rb
|
139
|
-
- test/
|
140
|
-
- test/rails_app/app/controllers/application_controller.rb
|
137
|
+
- test/models_test.rb
|
141
138
|
- test/rails_app/app/controllers/admins_controller.rb
|
139
|
+
- test/rails_app/app/controllers/application_controller.rb
|
142
140
|
- test/rails_app/app/controllers/home_controller.rb
|
143
141
|
- test/rails_app/app/controllers/users_controller.rb
|
144
|
-
- test/rails_app/app/models/user.rb
|
145
142
|
- test/rails_app/app/helpers/application_helper.rb
|
146
|
-
- test/rails_app/
|
143
|
+
- test/rails_app/app/models/user.rb
|
144
|
+
- test/rails_app/config/boot.rb
|
145
|
+
- test/rails_app/config/environment.rb
|
146
|
+
- test/rails_app/config/environments/development.rb
|
147
|
+
- test/rails_app/config/environments/production.rb
|
148
|
+
- test/rails_app/config/environments/test.rb
|
147
149
|
- test/rails_app/config/initializers/backtrace_silencers.rb
|
150
|
+
- test/rails_app/config/initializers/inflections.rb
|
148
151
|
- test/rails_app/config/initializers/new_rails_defaults.rb
|
149
152
|
- test/rails_app/config/initializers/session_store.rb
|
150
|
-
- test/rails_app/config/
|
151
|
-
- test/rails_app/config/environments/test.rb
|
152
|
-
- test/rails_app/config/environments/development.rb
|
153
|
-
- test/rails_app/config/environments/production.rb
|
154
|
-
- test/rails_app/config/environment.rb
|
155
|
-
- test/rails_app/config/boot.rb
|
153
|
+
- test/rails_app/config/routes.rb
|
156
154
|
- test/rails_app/vendor/plugins/devise_invitable/init.rb
|
155
|
+
- test/routes_test.rb
|
156
|
+
- test/test_helper.rb
|