devise_invitable 0.1.0 → 0.1.1

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.1.0
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
@@ -8,3 +8,5 @@
8
8
 
9
9
  <p><%= f.submit "Send an invitation" %></p>
10
10
  <% end %>
11
+
12
+ <%= link_to "Home", after_sign_in_path_for(resource_name) %><br />
@@ -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.0"
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-10}
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/model_tests_helper.rb",
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/routes_test.rb",
80
- "test/integration/invitable_test.rb",
78
+ "test/model_tests_helper.rb",
81
79
  "test/models/invitable_test.rb",
82
- "test/test_helper.rb",
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/config/routes.rb",
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/initializers/inflections.rb",
94
- "test/rails_app/config/environments/test.rb",
95
- "test/rails_app/config/environments/development.rb",
96
- "test/rails_app/config/environments/production.rb",
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.password = attributes[:password]
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
@@ -4,7 +4,7 @@ Devise.module_eval do
4
4
  @@invite_for = 0
5
5
  end
6
6
  Devise::ALL << :invitable
7
- Devise::CONTROLLERS = Devise::CONTROLLERS.merge(:invitations => [:invitable])
7
+ Devise::CONTROLLERS[:invitations] = [:invitable]
8
8
 
9
9
  module DeviseInvitable; end
10
10
 
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.0
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-10 00:00:00 +01:00
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/model_tests_helper.rb
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/routes_test.rb
137
- - test/integration/invitable_test.rb
135
+ - test/model_tests_helper.rb
138
136
  - test/models/invitable_test.rb
139
- - test/test_helper.rb
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/config/routes.rb
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/initializers/inflections.rb
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