devise 1.5.3 → 2.0.0

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.
Files changed (125) hide show
  1. data/CHANGELOG.rdoc +98 -71
  2. data/MIT-LICENSE +1 -1
  3. data/README.rdoc +4 -2
  4. data/app/controllers/devise/confirmations_controller.rb +3 -6
  5. data/app/controllers/devise/omniauth_callbacks_controller.rb +1 -3
  6. data/app/controllers/devise/passwords_controller.rb +3 -6
  7. data/app/controllers/devise/registrations_controller.rb +40 -42
  8. data/app/controllers/devise/sessions_controller.rb +2 -3
  9. data/app/controllers/devise/unlocks_controller.rb +4 -7
  10. data/app/controllers/devise_controller.rb +169 -0
  11. data/app/views/devise/_links.erb +25 -0
  12. data/app/views/devise/confirmations/new.html.erb +1 -1
  13. data/app/views/devise/mailer/confirmation_instructions.html.erb +1 -1
  14. data/app/views/devise/passwords/edit.html.erb +1 -1
  15. data/app/views/devise/passwords/new.html.erb +1 -1
  16. data/app/views/devise/registrations/new.html.erb +1 -1
  17. data/app/views/devise/sessions/new.html.erb +1 -1
  18. data/app/views/devise/shared/_links.erb +3 -25
  19. data/app/views/devise/unlocks/new.html.erb +1 -1
  20. data/config/locales/en.yml +5 -6
  21. data/lib/devise/controllers/helpers.rb +8 -2
  22. data/lib/devise/controllers/scoped_views.rb +0 -16
  23. data/lib/devise/controllers/url_helpers.rb +16 -2
  24. data/lib/devise/failure_app.rb +43 -8
  25. data/lib/devise/models/authenticatable.rb +22 -1
  26. data/lib/devise/models/confirmable.rb +80 -22
  27. data/lib/devise/models/database_authenticatable.rb +0 -11
  28. data/lib/devise/models/lockable.rb +1 -1
  29. data/lib/devise/models/recoverable.rb +5 -5
  30. data/lib/devise/models/rememberable.rb +5 -20
  31. data/lib/devise/models/serializable.rb +5 -2
  32. data/lib/devise/models/timeoutable.rb +1 -3
  33. data/lib/devise/models/token_authenticatable.rb +1 -4
  34. data/lib/devise/models/validatable.rb +1 -1
  35. data/lib/devise/models.rb +1 -1
  36. data/lib/devise/modules.rb +2 -2
  37. data/lib/devise/orm/active_record.rb +6 -0
  38. data/lib/devise/param_filter.rb +1 -1
  39. data/lib/devise/path_checker.rb +5 -1
  40. data/lib/devise/rails/routes.rb +16 -10
  41. data/lib/devise/rails/warden_compat.rb +0 -83
  42. data/lib/devise/rails.rb +61 -0
  43. data/lib/devise/schema.rb +5 -0
  44. data/lib/devise/strategies/authenticatable.rb +14 -10
  45. data/lib/devise/strategies/token_authenticatable.rb +3 -3
  46. data/lib/devise/version.rb +1 -1
  47. data/lib/devise.rb +56 -33
  48. data/lib/generators/active_record/devise_generator.rb +40 -2
  49. data/lib/generators/active_record/templates/migration.rb +1 -19
  50. data/lib/generators/active_record/templates/migration_existing.rb +1 -9
  51. data/lib/generators/devise/views_generator.rb +6 -14
  52. data/lib/generators/mongoid/devise_generator.rb +43 -0
  53. data/lib/generators/templates/devise.rb +26 -12
  54. data/lib/generators/templates/simple_form_for/confirmations/new.html.erb +1 -1
  55. data/lib/generators/templates/simple_form_for/passwords/edit.html.erb +1 -1
  56. data/lib/generators/templates/simple_form_for/passwords/new.html.erb +1 -1
  57. data/lib/generators/templates/simple_form_for/registrations/new.html.erb +1 -1
  58. data/lib/generators/templates/simple_form_for/sessions/new.html.erb +1 -1
  59. data/lib/generators/templates/simple_form_for/unlocks/new.html.erb +1 -1
  60. data/test/controllers/internal_helpers_test.rb +5 -4
  61. data/test/devise_test.rb +2 -2
  62. data/test/failure_app_test.rb +24 -20
  63. data/test/generators/active_record_generator_test.rb +3 -13
  64. data/test/generators/views_generator_test.rb +1 -1
  65. data/test/integration/authenticatable_test.rb +4 -7
  66. data/test/integration/confirmable_test.rb +55 -3
  67. data/test/integration/http_authenticatable_test.rb +20 -5
  68. data/test/integration/lockable_test.rb +26 -14
  69. data/test/integration/registerable_test.rb +33 -2
  70. data/test/integration/rememberable_test.rb +0 -50
  71. data/test/integration/timeoutable_test.rb +18 -4
  72. data/test/integration/token_authenticatable_test.rb +5 -5
  73. data/test/integration/trackable_test.rb +6 -6
  74. data/test/mapping_test.rb +2 -3
  75. data/test/models/confirmable_test.rb +101 -8
  76. data/test/models/database_authenticatable_test.rb +6 -0
  77. data/test/models/encryptable_test.rb +1 -1
  78. data/test/models/lockable_test.rb +13 -0
  79. data/test/models/recoverable_test.rb +0 -27
  80. data/test/models/rememberable_test.rb +41 -160
  81. data/test/models/serializable_test.rb +1 -1
  82. data/test/models_test.rb +7 -7
  83. data/test/rails_app/app/mongoid/admin.rb +22 -1
  84. data/test/rails_app/app/mongoid/user.rb +35 -0
  85. data/test/rails_app/config/initializers/devise.rb +6 -7
  86. data/test/rails_app/config/routes.rb +3 -5
  87. data/test/rails_app/db/migrate/20100401102949_create_tables.rb +58 -12
  88. data/test/rails_app/lib/shared_admin.rb +6 -2
  89. data/test/rails_app/log/development.log +13 -0
  90. data/test/rails_app/log/test.log +319550 -0
  91. data/test/support/assertions.rb +4 -1
  92. data/test/support/helpers.rb +0 -17
  93. data/test/support/integration.rb +3 -1
  94. data/test/test_helpers_test.rb +2 -2
  95. data/test/tmp/app/views/devise/_links.erb +25 -0
  96. data/test/tmp/app/views/devise/confirmations/new.html.erb +15 -0
  97. data/test/tmp/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  98. data/test/tmp/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  99. data/test/tmp/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  100. data/test/tmp/app/views/devise/passwords/edit.html.erb +19 -0
  101. data/test/tmp/app/views/devise/passwords/new.html.erb +15 -0
  102. data/test/tmp/app/views/devise/registrations/edit.html.erb +22 -0
  103. data/test/tmp/app/views/devise/registrations/new.html.erb +17 -0
  104. data/test/tmp/app/views/devise/sessions/new.html.erb +15 -0
  105. data/test/tmp/app/views/devise/unlocks/new.html.erb +15 -0
  106. data/test/tmp/app/views/users/_links.erb +25 -0
  107. data/test/tmp/app/views/users/confirmations/new.html.erb +15 -0
  108. data/test/tmp/app/views/users/mailer/confirmation_instructions.html.erb +5 -0
  109. data/test/tmp/app/views/users/mailer/reset_password_instructions.html.erb +8 -0
  110. data/test/tmp/app/views/users/mailer/unlock_instructions.html.erb +7 -0
  111. data/test/tmp/app/views/users/passwords/edit.html.erb +19 -0
  112. data/test/tmp/app/views/users/passwords/new.html.erb +15 -0
  113. data/test/tmp/app/views/users/registrations/edit.html.erb +22 -0
  114. data/test/tmp/app/views/users/registrations/new.html.erb +17 -0
  115. data/test/tmp/app/views/users/sessions/new.html.erb +15 -0
  116. data/test/tmp/app/views/users/unlocks/new.html.erb +15 -0
  117. metadata +78 -26
  118. data/.gitignore +0 -12
  119. data/.travis.yml +0 -13
  120. data/Gemfile +0 -35
  121. data/Rakefile +0 -34
  122. data/devise.gemspec +0 -25
  123. data/lib/devise/controllers/internal_helpers.rb +0 -154
  124. data/lib/devise/controllers/shared_helpers.rb +0 -26
  125. data/test/schema_test.rb +0 -33
@@ -14,8 +14,11 @@ class ActiveSupport::TestCase
14
14
  end
15
15
  alias :assert_present :assert_not_blank
16
16
 
17
- def assert_email_sent(&block)
17
+ def assert_email_sent(address = nil, &block)
18
18
  assert_difference('ActionMailer::Base.deliveries.size') { yield }
19
+ if address.present?
20
+ assert_equal address, ActionMailer::Base.deliveries.last['to'].to_s
21
+ end
19
22
  end
20
23
 
21
24
  def assert_email_not_sent(&block)
@@ -67,21 +67,4 @@ class ActiveSupport::TestCase
67
67
  end
68
68
  end
69
69
  end
70
-
71
- def with_rails_version(constants)
72
- saved_constants = {}
73
-
74
- constants.each do |constant, val|
75
- saved_constants[constant] = ::Rails::VERSION.const_get constant
76
- Kernel::silence_warnings { ::Rails::VERSION.const_set(constant, val) }
77
- end
78
-
79
- begin
80
- yield
81
- ensure
82
- constants.each do |constant, val|
83
- Kernel::silence_warnings { ::Rails::VERSION.const_set(constant, saved_constants[constant]) }
84
- end
85
- end
86
- end
87
70
  end
@@ -23,8 +23,10 @@ class ActionDispatch::IntegrationTest
23
23
  def create_admin(options={})
24
24
  @admin ||= begin
25
25
  admin = Admin.create!(
26
- :email => 'admin@test.com', :password => '123456', :password_confirmation => '123456'
26
+ :email => options[:email] || 'admin@test.com',
27
+ :password => '123456', :password_confirmation => '123456'
27
28
  )
29
+ admin.confirm! unless options[:confirm] == false
28
30
  admin
29
31
  end
30
32
  end
@@ -17,7 +17,7 @@ class TestHelpersTest < ActionController::TestCase
17
17
  end
18
18
 
19
19
  test "redirects if attempting to access a page with an unconfirmed account" do
20
- swap Devise, :confirm_within => 0 do
20
+ swap Devise, :allow_unconfirmed_access_for => 0 do
21
21
  user = create_user
22
22
  assert !user.active_for_authentication?
23
23
 
@@ -28,7 +28,7 @@ class TestHelpersTest < ActionController::TestCase
28
28
  end
29
29
 
30
30
  test "returns nil if accessing current_user with an unconfirmed account" do
31
- swap Devise, :confirm_within => 0 do
31
+ swap Devise, :allow_unconfirmed_access_for => 0 do
32
32
  user = create_user
33
33
  assert !user.active_for_authentication?
34
34
 
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,15 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Resend confirmation instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,19 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <%= f.input :reset_password_token, :as => :hidden %>
7
+ <%= f.full_error :reset_password_token %>
8
+
9
+ <div class="inputs">
10
+ <%= f.input :password, :label => "New password", :required => true %>
11
+ <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
12
+ </div>
13
+
14
+ <div class="actions">
15
+ <%= f.button :submit, "Change my password" %>
16
+ </div>
17
+ <% end %>
18
+
19
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Send me reset password instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,22 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true, :autofocus => true %>
8
+ <%= f.input :password, :hint => "leave it blank if you don't want to change it", :required => false %>
9
+ <%= f.input :password_confirmation, :required => false %>
10
+ <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %>
11
+ </div>
12
+
13
+ <div class="actions">
14
+ <%= f.button :submit, "Update" %>
15
+ </div>
16
+ <% end %>
17
+
18
+ <h3>Cancel my account</h3>
19
+
20
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
21
+
22
+ <%= link_to "Back", :back %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true, :autofocus => true %>
8
+ <%= f.input :password, :required => true %>
9
+ <%= f.input :password_confirmation, :required => true %>
10
+ </div>
11
+
12
+ <div class="actions">
13
+ <%= f.button :submit, "Sign up" %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
+ <div class="inputs">
5
+ <%= f.input :email, :required => false, :autofocus => true %>
6
+ <%= f.input :password, :required => false %>
7
+ <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Sign in" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Resend unlock instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,15 @@
1
+ <h2>Resend confirmation instructions</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Resend confirmation instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,5 @@
1
+ <p>Welcome <%= @resource.email %>!</p>
2
+
3
+ <p>You can confirm your account email through the link below:</p>
4
+
5
+ <p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
@@ -0,0 +1,8 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Someone has requested a link to change your password, and you can do this through the link below.</p>
4
+
5
+ <p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
6
+
7
+ <p>If you didn't request this, please ignore this email.</p>
8
+ <p>Your password won't change until you access the link above and create a new one.</p>
@@ -0,0 +1,7 @@
1
+ <p>Hello <%= @resource.email %>!</p>
2
+
3
+ <p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
4
+
5
+ <p>Click the link below to unlock your account:</p>
6
+
7
+ <p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
@@ -0,0 +1,19 @@
1
+ <h2>Change your password</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <%= f.input :reset_password_token, :as => :hidden %>
7
+ <%= f.full_error :reset_password_token %>
8
+
9
+ <div class="inputs">
10
+ <%= f.input :password, :label => "New password", :required => true %>
11
+ <%= f.input :password_confirmation, :label => "Confirm your new password", :required => true %>
12
+ </div>
13
+
14
+ <div class="actions">
15
+ <%= f.button :submit, "Change my password" %>
16
+ </div>
17
+ <% end %>
18
+
19
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Forgot your password?</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Send me reset password instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,22 @@
1
+ <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true, :autofocus => true %>
8
+ <%= f.input :password, :hint => "leave it blank if you don't want to change it", :required => false %>
9
+ <%= f.input :password_confirmation, :required => false %>
10
+ <%= f.input :current_password, :hint => "we need your current password to confirm your changes", :required => true %>
11
+ </div>
12
+
13
+ <div class="actions">
14
+ <%= f.button :submit, "Update" %>
15
+ </div>
16
+ <% end %>
17
+
18
+ <h3>Cancel my account</h3>
19
+
20
+ <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
21
+
22
+ <%= link_to "Back", :back %>
@@ -0,0 +1,17 @@
1
+ <h2>Sign up</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true, :autofocus => true %>
8
+ <%= f.input :password, :required => true %>
9
+ <%= f.input :password_confirmation, :required => true %>
10
+ </div>
11
+
12
+ <div class="actions">
13
+ <%= f.button :submit, "Sign up" %>
14
+ </div>
15
+ <% end %>
16
+
17
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Sign in</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
+ <div class="inputs">
5
+ <%= f.input :email, :required => false, :autofocus => true %>
6
+ <%= f.input :password, :required => false %>
7
+ <%= f.input :remember_me, :as => :boolean if devise_mapping.rememberable? %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Sign in" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>
@@ -0,0 +1,15 @@
1
+ <h2>Resend unlock instructions</h2>
2
+
3
+ <%= simple_form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
+ <%= f.error_notification %>
5
+
6
+ <div class="inputs">
7
+ <%= f.input :email, :required => true %>
8
+ </div>
9
+
10
+ <div class="actions">
11
+ <%= f.button :submit, "Resend unlock instructions" %>
12
+ </div>
13
+ <% end %>
14
+
15
+ <%= render "links" %>