@@ -11,24 +11,24 @@ class AuthenticationGenerator < Base # :nodoc:
11
11
end
12
12
13
13
def create_authentication_files
14
- template "models/session.rb" , File . join ( " app/models/session.rb")
15
- template "models/user.rb" , File . join ( " app/models/user.rb")
16
- template "models/current.rb" , File . join ( " app/models/current.rb")
14
+ template "app/models/session.rb"
15
+ template "app/models/user.rb"
16
+ template "app/models/current.rb"
17
17
18
- template "controllers/sessions_controller.rb" , File . join ( " app/controllers/sessions_controller.rb")
19
- template "controllers/concerns/authentication.rb" , File . join ( " app/controllers/concerns/authentication.rb")
20
- template "controllers/passwords_controller.rb" , File . join ( " app/controllers/passwords_controller.rb")
18
+ template "app/controllers/sessions_controller.rb"
19
+ template "app/controllers/concerns/authentication.rb"
20
+ template "app/controllers/passwords_controller.rb"
21
21
22
- template "mailers/passwords_mailer.rb" , File . join ( " app/mailers/passwords_mailer.rb")
22
+ template "app/mailers/passwords_mailer.rb"
23
23
24
- template "views/passwords_mailer/reset.html.erb" , File . join ( " app/views/passwords_mailer/reset.html.erb")
25
- template "views/passwords_mailer/reset.text.erb" , File . join ( " app/views/passwords_mailer/reset.text.erb")
24
+ template "app/views/passwords_mailer/reset.html.erb"
25
+ template "app/views/passwords_mailer/reset.text.erb"
26
26
27
- template "test/mailers/previews/passwords_mailer_preview.rb" , File . join ( "test/mailers/previews/passwords_mailer_preview.rb" )
27
+ template "test/mailers/previews/passwords_mailer_preview.rb"
28
28
end
29
29
30
30
def configure_application_controller
31
- gsub_file "app/controllers/application_controller.rb" , /(class ApplicationController < ActionController::Base)/ , "\\ 1 \n include Authentication"
31
+ inject_into_class "app/controllers/application_controller.rb" , " ApplicationController" , " include Authentication\n "
32
32
end
33
33
34
34
def configure_authentication_routes
0 commit comments