mix-auth 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. data/README.rdoc +1 -1
  2. data/app/assets/javascripts/admix/users.js +2 -0
  3. data/app/assets/stylesheets/admix/users.css +4 -0
  4. data/app/controllers/admix/users_controller.rb +16 -0
  5. data/app/helpers/admix/users_helper.rb +5 -0
  6. data/app/models/admix/user_report.rb +15 -0
  7. data/app/models/user.rb +43 -0
  8. data/config/initializers/devise.rb +17 -25
  9. data/config/locales/auth.en.yml +17 -0
  10. data/config/locales/auth.pt-BR.yml +8 -1
  11. data/config/routes.rb +9 -3
  12. data/lib/auth/engine.rb +0 -1
  13. data/lib/auth/version.rb +1 -1
  14. data/lib/auth.rb +5 -1
  15. data/lib/mix-auth.rb +1 -7
  16. metadata +54 -32
  17. data/app/assets/javascripts/auth/application.js +0 -15
  18. data/app/assets/stylesheets/auth/application.css +0 -13
  19. data/app/controllers/auth/application_controller.rb +0 -4
  20. data/app/controllers/auth/sessions_controller.rb +0 -7
  21. data/app/helpers/auth/application_helper.rb +0 -4
  22. data/app/models/auth/user.rb +0 -45
  23. data/app/views/layouts/auth/application.html.erb +0 -15
  24. data/app/views/users/confirmations/new.html.erb +0 -12
  25. data/app/views/users/mailer/confirmation_instructions.html.erb +0 -5
  26. data/app/views/users/mailer/reset_password_instructions.html.erb +0 -8
  27. data/app/views/users/mailer/unlock_instructions.html.erb +0 -7
  28. data/app/views/users/passwords/edit.html.erb +0 -16
  29. data/app/views/users/passwords/new.html.erb +0 -12
  30. data/app/views/users/registrations/edit.html.erb +0 -25
  31. data/app/views/users/registrations/new.html.erb +0 -18
  32. data/app/views/users/sessions/new.html.erb +0 -17
  33. data/app/views/users/shared/_links.erb +0 -25
  34. data/app/views/users/unlocks/new.html.erb +0 -12
  35. data/config/initializers/locales.rb +0 -1
data/README.rdoc CHANGED
@@ -1,3 +1,3 @@
1
- = MixAuth
1
+ = Auth
2
2
 
3
3
  This project rocks and uses MIT-LICENSE.
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,16 @@
1
+ class Admix::UsersController < Admix::InheritedController
2
+ #defaults route_prefix: 'admix'
3
+
4
+ #breadcrumbs.add t('users.users')
5
+
6
+
7
+ before_filter :get_report
8
+
9
+ protected
10
+ def get_report
11
+ @report = Admix::UserReport.new(params[:admix_user_report])
12
+ @assets = @report.assets.paginate(:page => params[:page], :per_page => 2)
13
+ end
14
+
15
+
16
+ end
@@ -0,0 +1,5 @@
1
+ module Admix::UsersHelper
2
+ def form_attributes
3
+ %w(email password password_confirmation)
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ class Admix::UserReport
2
+
3
+ include Datagrid
4
+
5
+ scope do
6
+ User.desc(:email)
7
+ end
8
+
9
+ filter :email, :string
10
+ filter :last_sign_in_at, :date
11
+
12
+ column :email
13
+ column :last_sign_in_at
14
+
15
+ end
@@ -0,0 +1,43 @@
1
+ class User
2
+ include Mongoid::Document
3
+ # Include default devise modules. Others available are:
4
+ # :token_authenticatable, :confirmable,
5
+ # :lockable, :timeoutable and :omniauthable
6
+ devise :database_authenticatable, :registerable,
7
+ :recoverable, :rememberable, :trackable, :validatable
8
+
9
+ ## Database authenticatable
10
+ field :email, :type => String, :default => ""
11
+ field :encrypted_password, :type => String, :default => ""
12
+
13
+ validates_presence_of :email
14
+ validates_presence_of :encrypted_password
15
+
16
+ ## Recoverable
17
+ field :reset_password_token, :type => String
18
+ field :reset_password_sent_at, :type => Time
19
+
20
+ ## Rememberable
21
+ field :remember_created_at, :type => Time
22
+
23
+ ## Trackable
24
+ field :sign_in_count, :type => Integer, :default => 0
25
+ field :current_sign_in_at, :type => Time
26
+ field :last_sign_in_at, :type => Time
27
+ field :current_sign_in_ip, :type => String
28
+ field :last_sign_in_ip, :type => String
29
+
30
+ ## Confirmable
31
+ # field :confirmation_token, :type => String
32
+ # field :confirmed_at, :type => Time
33
+ # field :confirmation_sent_at, :type => Time
34
+ # field :unconfirmed_email, :type => String # Only if using reconfirmable
35
+
36
+ ## Lockable
37
+ # field :failed_attempts, :type => Integer, :default => 0 # Only if lock strategy is :failed_attempts
38
+ # field :unlock_token, :type => String # Only if unlock strategy is :email or :both
39
+ # field :locked_at, :type => Time
40
+
41
+ ## Token authenticatable
42
+ # field :authentication_token, :type => String
43
+ end
@@ -1,33 +1,13 @@
1
1
  # Use this hook to configure devise mailer, warden hooks and so forth.
2
2
  # Many of these configuration options can be set straight in your model.
3
3
  Devise.setup do |config|
4
-
5
- # ==> Mountable engine configurations
6
- # When using Devise inside an engine, let's call it `MyEngine`, and this engine
7
- # is mountable, there are some extra configurations to be taken into account.
8
- # The following options are available, assuming the engine is mounted as:
9
- #
10
- # mount MyEngine, at: "/my_engine"
11
- #
12
- # The router that invoked `devise_for`, in the example above, would be:
13
- config.router_name = :auth
14
- #
15
- # When using omniauth, Devise cannot automatically set Omniauth path,
16
- # so you need to do it manually. For the users scope, it would be:
17
- # config.omniauth_path_prefix = "/my_engine/users/auth"
18
-
19
- #config.router_name = :auth_user
20
- #
21
-
22
- #config.action_mailer.default_url_options = { :host => 'localhost:3000' }
23
-
24
4
  # ==> Mailer Configuration
25
5
  # Configure the e-mail address which will be shown in Devise::Mailer,
26
6
  # note that it will be overwritten if you use your own mailer class with default "from" parameter.
27
- config.mailer_sender = "sadjow@mixinternet.com.br"
7
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
28
8
 
29
9
  # Configure the class responsible to send e-mails.
30
- #config.mailer = "Devise::Mailer"
10
+ # config.mailer = "Devise::Mailer"
31
11
 
32
12
  # ==> ORM configuration
33
13
  # Load and configure the ORM. Supports :active_record (default) and
@@ -102,7 +82,7 @@ Devise.setup do |config|
102
82
  config.stretches = Rails.env.test? ? 1 : 10
103
83
 
104
84
  # Setup a pepper to generate the encrypted password.
105
- # config.pepper = "2d64e716afba701787bd988f00ce42bc2ddad6ecadded3cb380403092bb1787634af6549c23aade13adc9dad9d90d0a954b7a7e9e9e5d3dfcfb33174b8cba570"
85
+ # config.pepper = "4a428d33a7f2f1d8f58481c17987d070ebcfb5390d1159adff4b1f694f2007c4667ecd6e59fbfc3b7ed30e4fce4b6163fb72b83b778890f26d2d7172a4d9dbff"
106
86
 
107
87
  # ==> Configuration for :confirmable
108
88
  # A period that the user is allowed to access the website even without
@@ -198,7 +178,7 @@ Devise.setup do |config|
198
178
  # Turn scoped views on. Before rendering "sessions/new", it will first check for
199
179
  # "users/sessions/new". It's turned off by default because it's slower if you
200
180
  # are using only default views.
201
- config.scoped_views = true
181
+ # config.scoped_views = false
202
182
 
203
183
  # Configure the default scope given to Warden. By default it's the first
204
184
  # devise role declared in your routes (usually :user).
@@ -236,5 +216,17 @@ Devise.setup do |config|
236
216
  # manager.default_strategies(:scope => :user).unshift :some_external_strategy
237
217
  # end
238
218
 
239
-
219
+ # ==> Mountable engine configurations
220
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
221
+ # is mountable, there are some extra configurations to be taken into account.
222
+ # The following options are available, assuming the engine is mounted as:
223
+ #
224
+ # mount MyEngine, at: "/my_engine"
225
+ #
226
+ # The router that invoked `devise_for`, in the example above, would be:
227
+ # config.router_name = :my_engine
228
+ #
229
+ # When using omniauth, Devise cannot automatically set Omniauth path,
230
+ # so you need to do it manually. For the users scope, it would be:
231
+ # config.omniauth_path_prefix = "/my_engine/users/auth"
240
232
  end
@@ -0,0 +1,17 @@
1
+ en:
2
+ submit_sign_in: "Entrar"
3
+
4
+
5
+ helpers:
6
+ label:
7
+ user:
8
+ email: 'E-mail'
9
+ password: 'Senha'
10
+ remember_me: 'Lembrar de mim da proxima vez.'
11
+
12
+ activerecord:
13
+ attributes:
14
+ user:
15
+ email: 'E-mail'
16
+ password: 'Password'
17
+ password_confirmation: 'Password confirmation'
@@ -7,4 +7,11 @@ pt-BR:
7
7
  user:
8
8
  email: 'E-mail'
9
9
  password: 'Senha'
10
- remember_me: 'Lembrar de mim da proxima vez.'
10
+ remember_me: 'Lembrar de mim da proxima vez.'
11
+
12
+ activerecord:
13
+ attributes:
14
+ user:
15
+ email: 'E-mail'
16
+ password: 'Senha'
17
+ password_confirmation: 'Senha'
data/config/routes.rb CHANGED
@@ -1,3 +1,9 @@
1
- Auth::Engine.routes.draw do
2
- devise_for :users, class_name: 'Auth::User', module: :devise, mounted: true
3
- end
1
+ Rails.application.routes.draw do
2
+
3
+ devise_for :users
4
+
5
+ namespace :admix do
6
+ resources :users
7
+ end
8
+
9
+ end
data/lib/auth/engine.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  module Auth
2
2
  class Engine < ::Rails::Engine
3
- isolate_namespace Auth
4
3
  end
5
4
  end
data/lib/auth/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Auth
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/auth.rb CHANGED
@@ -1 +1,5 @@
1
- require 'mix-auth'
1
+ require "auth/engine"
2
+ require 'devise'
3
+
4
+ module Auth
5
+ end
data/lib/mix-auth.rb CHANGED
@@ -1,7 +1 @@
1
- require "auth/engine"
2
-
3
- #require "mongoid"
4
- #require "devise"
5
-
6
- module Auth
7
- end
1
+ require 'auth'
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mix-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Sadjow Leão
8
+ - Sadjow
9
+ - Rafael
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2012-12-26 00:00:00.000000000 Z
13
+ date: 2012-12-28 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: rails
@@ -75,46 +76,67 @@ dependencies:
75
76
  - - ~>
76
77
  - !ruby/object:Gem::Version
77
78
  version: 3.0.15
78
- description: This module provides auth funcionality.
79
+ - !ruby/object:Gem::Dependency
80
+ name: mix-rails
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ~>
85
+ - !ruby/object:Gem::Version
86
+ version: 0.3.0
87
+ type: :runtime
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ~>
93
+ - !ruby/object:Gem::Version
94
+ version: 0.3.0
95
+ - !ruby/object:Gem::Dependency
96
+ name: will_paginate_mongoid
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ description: Description of Auth.
79
112
  email:
80
113
  - sadjow@gmail.com
114
+ - rafbgarcia@gmail.com
81
115
  executables: []
82
116
  extensions: []
83
117
  extra_rdoc_files: []
84
118
  files:
85
- - app/controllers/auth/sessions_controller.rb
86
- - app/controllers/auth/application_controller.rb
87
- - app/assets/stylesheets/auth/application.css
88
- - app/assets/javascripts/auth/application.js
89
- - app/helpers/auth/application_helper.rb
90
- - app/models/auth/user.rb
91
- - app/views/layouts/auth/application.html.erb
92
- - app/views/users/passwords/new.html.erb
93
- - app/views/users/passwords/edit.html.erb
94
- - app/views/users/shared/_links.erb
95
- - app/views/users/registrations/new.html.erb
96
- - app/views/users/registrations/edit.html.erb
97
- - app/views/users/mailer/reset_password_instructions.html.erb
98
- - app/views/users/mailer/confirmation_instructions.html.erb
99
- - app/views/users/mailer/unlock_instructions.html.erb
100
- - app/views/users/unlocks/new.html.erb
101
- - app/views/users/confirmations/new.html.erb
102
- - app/views/users/sessions/new.html.erb
103
- - config/locales/devise.pt-BR.yml
104
- - config/locales/devise.en.yml
105
- - config/locales/auth.pt-BR.yml
119
+ - app/assets/stylesheets/admix/users.css
120
+ - app/assets/javascripts/admix/users.js
121
+ - app/controllers/admix/users_controller.rb
122
+ - app/models/user.rb
123
+ - app/models/admix/user_report.rb
124
+ - app/helpers/admix/users_helper.rb
106
125
  - config/initializers/devise.rb
107
- - config/initializers/locales.rb
108
126
  - config/routes.rb
109
- - lib/tasks/auth_tasks.rake
127
+ - config/locales/devise.pt-BR.yml
128
+ - config/locales/auth.pt-BR.yml
129
+ - config/locales/devise.en.yml
130
+ - config/locales/auth.en.yml
110
131
  - lib/auth/version.rb
111
132
  - lib/auth/engine.rb
112
- - lib/auth.rb
133
+ - lib/tasks/auth_tasks.rake
113
134
  - lib/mix-auth.rb
135
+ - lib/auth.rb
114
136
  - MIT-LICENSE
115
137
  - Rakefile
116
138
  - README.rdoc
117
- homepage: https://github.com/mixinternet/mix-auth
139
+ homepage: http://github.com/mixinternet/mix-auth
118
140
  licenses: []
119
141
  post_install_message:
120
142
  rdoc_options: []
@@ -128,7 +150,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
150
  version: '0'
129
151
  segments:
130
152
  - 0
131
- hash: 1988393460617971978
153
+ hash: 601777783800646623
132
154
  required_rubygems_version: !ruby/object:Gem::Requirement
133
155
  none: false
134
156
  requirements:
@@ -137,11 +159,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
159
  version: '0'
138
160
  segments:
139
161
  - 0
140
- hash: 1988393460617971978
162
+ hash: 601777783800646623
141
163
  requirements: []
142
164
  rubyforge_project:
143
165
  rubygems_version: 1.8.24
144
166
  signing_key:
145
167
  specification_version: 3
146
- summary: This module provides auth funcionality.
168
+ summary: Summary of Auth.
147
169
  test_files: []
@@ -1,15 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // the compiled file.
9
- //
10
- // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
- // GO AFTER THE REQUIRES BELOW.
12
- //
13
- //= require jquery
14
- //= require jquery_ujs
15
- //= require_tree .
@@ -1,13 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the top of the
9
- * compiled file, but it's generally better to create a new file per style scope.
10
- *
11
- *= require_self
12
- *= require_tree .
13
- */
@@ -1,4 +0,0 @@
1
- module Auth
2
- class ApplicationController < ActionController::Base
3
- end
4
- end
@@ -1,7 +0,0 @@
1
- module Auth
2
- class SessionsController < Devise::SessionsController
3
- def new
4
-
5
- end
6
- end
7
- end
@@ -1,4 +0,0 @@
1
- module Auth
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,45 +0,0 @@
1
- module Auth
2
- class User
3
- include Mongoid::Document
4
- # Include default devise modules. Others available are:
5
- # :token_authenticatable, :confirmable,
6
- # :lockable, :timeoutable and :omniauthable
7
- devise :database_authenticatable, :registerable,
8
- :recoverable, :rememberable, :trackable, :validatable
9
-
10
- ## Database authenticatable
11
- field :email, :type => String, :default => ""
12
- field :encrypted_password, :type => String, :default => ""
13
-
14
- validates_presence_of :email
15
- validates_presence_of :encrypted_password
16
-
17
- ## Recoverable
18
- field :reset_password_token, :type => String
19
- field :reset_password_sent_at, :type => Time
20
-
21
- ## Rememberable
22
- field :remember_created_at, :type => Time
23
-
24
- ## Trackable
25
- field :sign_in_count, :type => Integer, :default => 0
26
- field :current_sign_in_at, :type => Time
27
- field :last_sign_in_at, :type => Time
28
- field :current_sign_in_ip, :type => String
29
- field :last_sign_in_ip, :type => String
30
-
31
- ## Confirmable
32
- # field :confirmation_token, :type => String
33
- # field :confirmed_at, :type => Time
34
- # field :confirmation_sent_at, :type => Time
35
- # field :unconfirmed_email, :type => String # Only if using reconfirmable
36
-
37
- ## Lockable
38
- # field :failed_attempts, :type => Integer, :default => 0 # Only if lock strategy is :failed_attempts
39
- # field :unlock_token, :type => String # Only if unlock strategy is :email or :both
40
- # field :locked_at, :type => Time
41
-
42
- ## Token authenticatable
43
- # field :authentication_token, :type => String
44
- end
45
- end
@@ -1,15 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Auth</title>
5
- <%= stylesheet_link_tag "auth/application", :media => "all" %>
6
- <%= javascript_include_tag "auth/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
- <div><%= flash[:notice] %> </div>
11
- <div><%= flash[:alert] %> </div>
12
- <%= yield %>
13
-
14
- </body>
15
- </html>
@@ -1,12 +0,0 @@
1
- <h2>Resend confirmation instructions</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div><%= f.label :email %><br />
7
- <%= f.email_field :email %></div>
8
-
9
- <div><%= f.submit "Resend confirmation instructions" %></div>
10
- <% end %>
11
-
12
- <%= render "devise/shared/links" %>
@@ -1,5 +0,0 @@
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>
@@ -1,8 +0,0 @@
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>
@@ -1,7 +0,0 @@
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>
@@ -1,16 +0,0 @@
1
- <h2>Change your password</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= devise_error_messages! %>
5
- <%= f.hidden_field :reset_password_token %>
6
-
7
- <div><%= f.label :password, "New password" %><br />
8
- <%= f.password_field :password %></div>
9
-
10
- <div><%= f.label :password_confirmation, "Confirm new password" %><br />
11
- <%= f.password_field :password_confirmation %></div>
12
-
13
- <div><%= f.submit "Change my password" %></div>
14
- <% end %>
15
-
16
- <%= render "devise/shared/links" %>
@@ -1,12 +0,0 @@
1
- <h2>Forgot your password?</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div><%= f.label :email %><br />
7
- <%= f.email_field :email %></div>
8
-
9
- <div><%= f.submit "Send me reset password instructions" %></div>
10
- <% end %>
11
-
12
- <%= render "devise/shared/links" %>
@@ -1,25 +0,0 @@
1
- <h2>Edit <%= resource_name.to_s.humanize %></h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div><%= f.label :email %><br />
7
- <%= f.email_field :email %></div>
8
-
9
- <div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
10
- <%= f.password_field :password, :autocomplete => "off" %></div>
11
-
12
- <div><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></div>
14
-
15
- <div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
16
- <%= f.password_field :current_password %></div>
17
-
18
- <div><%= f.submit "Update" %></div>
19
- <% end %>
20
-
21
- <h3>Cancel my account</h3>
22
-
23
- <p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>.</p>
24
-
25
- <%= link_to "Back", :back %>
@@ -1,18 +0,0 @@
1
- <h2>Sign up</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div><%= f.label :email %><br />
7
- <%= f.email_field :email %></div>
8
-
9
- <div><%= f.label :password %><br />
10
- <%= f.password_field :password %></div>
11
-
12
- <div><%= f.label :password_confirmation %><br />
13
- <%= f.password_field :password_confirmation %></div>
14
-
15
- <div><%= f.submit "Sign up" %></div>
16
- <% end %>
17
-
18
- <%= render "devise/shared/links" %>
@@ -1,17 +0,0 @@
1
- <h2>Sign in</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
4
- <div><%= f.label :email %><br />
5
- <%= f.email_field :email %></div>
6
-
7
- <div><%= f.label :password %><br />
8
- <%= f.password_field :password %></div>
9
-
10
- <% if devise_mapping.rememberable? -%>
11
- <div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
12
- <% end -%>
13
-
14
- <div><%= f.submit t("submit_sign_in") %></div>
15
- <% end %>
16
-
17
- <%= render "devise/shared/links" %>
@@ -1,25 +0,0 @@
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 -%>
@@ -1,12 +0,0 @@
1
- <h2>Resend unlock instructions</h2>
2
-
3
- <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
4
- <%= devise_error_messages! %>
5
-
6
- <div><%= f.label :email %><br />
7
- <%= f.email_field :email %></div>
8
-
9
- <div><%= f.submit "Resend unlock instructions" %></div>
10
- <% end %>
11
-
12
- <%= render "devise/shared/links" %>
@@ -1 +0,0 @@
1
- I18n.default_locale = :"pt-BR"