質問編集履歴
1
3度目も同じく記述したファイル類は全てロールバックしました。その際のgitなどです。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,92 @@
|
|
1
|
+
```ここに言語を入力
|
2
|
+
gitは、以下の順で実施しえちます。
|
3
|
+
$ rails test
|
4
|
+
$ git add -A
|
5
|
+
warning: LF will be replaced by CRLF in app/assets/javascripts/account_activations.coffee.
|
6
|
+
The file will have its original line endings in your working directory
|
7
|
+
warning: LF will be replaced by CRLF in app/assets/stylesheets/account_activations.scss.
|
8
|
+
The file will have its original line endings in your working directory
|
9
|
+
warning: LF will be replaced by CRLF in app/controllers/account_activations_controller.rb.
|
10
|
+
The file will have its original line endings in your working directory
|
11
|
+
warning: LF will be replaced by CRLF in app/helpers/account_activations_helper.rb.
|
12
|
+
The file will have its original line endings in your working directory
|
13
|
+
warning: LF will be replaced by CRLF in app/mailers/user_mailer.rb.
|
14
|
+
The file will have its original line endings in your working directory
|
15
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/account_activation.html.erb.
|
16
|
+
The file will have its original line endings in your working directory
|
17
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/account_activation.text.erb.
|
18
|
+
The file will have its original line endings in your working directory
|
19
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/password_reset.html.erb.
|
20
|
+
The file will have its original line endings in your working directory
|
21
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/password_reset.text.erb.
|
22
|
+
The file will have its original line endings in your working directory
|
23
|
+
warning: LF will be replaced by CRLF in db/migrate/20200112080817_add_activation_to_users.rb.
|
24
|
+
The file will have its original line endings in your working directory
|
25
|
+
warning: LF will be replaced by CRLF in test/controllers/account_activations_controller_test.rb.
|
26
|
+
The file will have its original line endings in your working directory
|
27
|
+
warning: LF will be replaced by CRLF in test/mailers/previews/user_mailer_preview.rb.
|
28
|
+
The file will have its original line endings in your working directory
|
29
|
+
warning: LF will be replaced by CRLF in test/mailers/user_mailer_test.rb.
|
30
|
+
The file will have its original line endings in your working directory
|
31
|
+
|
32
|
+
$ git commit -m "Add account activation"
|
33
|
+
[account-activation 90ea9d4] Add account activation
|
34
|
+
30 files changed, 247 insertions(+), 69 deletions(-)
|
35
|
+
create mode 100644 app/assets/javascripts/account_activations.coffee
|
36
|
+
create mode 100644 app/assets/stylesheets/account_activations.scss
|
37
|
+
create mode 100644 app/controllers/account_activations_controller.rb
|
38
|
+
create mode 100644 app/helpers/account_activations_helper.rb
|
39
|
+
create mode 100644 app/mailers/user_mailer.rb
|
40
|
+
create mode 100644 app/views/user_mailer/account_activation.html.erb
|
41
|
+
create mode 100644 app/views/user_mailer/account_activation.text.erb
|
42
|
+
create mode 100644 app/views/user_mailer/password_reset.html.erb
|
43
|
+
create mode 100644 app/views/user_mailer/password_reset.text.erb
|
44
|
+
create mode 100644 db/migrate/20200112080817_add_activation_to_users.rb
|
45
|
+
create mode 100644 test/controllers/account_activations_controller_test.rb
|
46
|
+
delete mode 100644 test/integration/user_signup_test.rb
|
47
|
+
create mode 100644 test/mailers/previews/user_mailer_preview.rb
|
48
|
+
create mode 100644 test/mailers/user_mailer_test.rb
|
49
|
+
|
50
|
+
$ git checkout master
|
51
|
+
Switched to branch 'master'
|
52
|
+
Your branch is up to date with 'origin/master'.
|
53
|
+
|
54
|
+
$ git merge account-activation
|
55
|
+
$ git merge account-activation
|
56
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
57
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
58
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
59
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
60
|
+
Updating a79ce83..90ea9d4
|
61
|
+
|
62
|
+
上記エラーのapp/views/user_mailer.rbのコードです。
|
63
|
+
↓
|
64
|
+
class UserMailer < ApplicationMailer
|
65
|
+
|
66
|
+
# Subject can be set in your I18n file at config/locales/en.yml
|
67
|
+
# with the following lookup:
|
68
|
+
#
|
69
|
+
# en.user_mailer.account_activation.subject
|
70
|
+
#
|
71
|
+
def account_activation(user)
|
72
|
+
@user = user
|
73
|
+
mail to: user.email, subject: "Account activation"
|
74
|
+
end
|
75
|
+
|
76
|
+
# Subject can be set in your I18n file at config/locales/en.yml
|
77
|
+
# with the following lookup:
|
78
|
+
#
|
79
|
+
# en.user_mailer.password_reset.subject
|
80
|
+
#
|
81
|
+
def password_reset
|
82
|
+
@greeting = "Hi"
|
83
|
+
|
84
|
+
mail to: "to@example.org"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
|
1
|
-
### 前提・実現したいこと
|
89
|
+
```### 前提・実現したいこと
|
2
90
|
現在、Railsチュートリアルの第11章を最終git mergeすると、記述したcodeが全て消え、記述前状態に戻ってしまいます。
|
3
91
|
2回やってみましたが、2回とも同じ現象になり、また、エディター(Atom)を消そうとするとsaveにするとそのまま閉じずに
|
4
92
|
エクスプローラーが立ち上がりaccount_activation.text.erbファイルの保存を促してきます。
|