質問編集履歴
1
3度目も同じく記述したファイル類は全てロールバックしました。その際のgitなどです。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,180 @@
|
|
1
|
+
```ここに言語を入力
|
2
|
+
|
3
|
+
gitは、以下の順で実施しえちます。
|
4
|
+
|
5
|
+
$ rails test
|
6
|
+
|
7
|
+
$ git add -A
|
8
|
+
|
9
|
+
warning: LF will be replaced by CRLF in app/assets/javascripts/account_activations.coffee.
|
10
|
+
|
11
|
+
The file will have its original line endings in your working directory
|
12
|
+
|
13
|
+
warning: LF will be replaced by CRLF in app/assets/stylesheets/account_activations.scss.
|
14
|
+
|
15
|
+
The file will have its original line endings in your working directory
|
16
|
+
|
17
|
+
warning: LF will be replaced by CRLF in app/controllers/account_activations_controller.rb.
|
18
|
+
|
19
|
+
The file will have its original line endings in your working directory
|
20
|
+
|
21
|
+
warning: LF will be replaced by CRLF in app/helpers/account_activations_helper.rb.
|
22
|
+
|
23
|
+
The file will have its original line endings in your working directory
|
24
|
+
|
25
|
+
warning: LF will be replaced by CRLF in app/mailers/user_mailer.rb.
|
26
|
+
|
27
|
+
The file will have its original line endings in your working directory
|
28
|
+
|
29
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/account_activation.html.erb.
|
30
|
+
|
31
|
+
The file will have its original line endings in your working directory
|
32
|
+
|
33
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/account_activation.text.erb.
|
34
|
+
|
35
|
+
The file will have its original line endings in your working directory
|
36
|
+
|
37
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/password_reset.html.erb.
|
38
|
+
|
39
|
+
The file will have its original line endings in your working directory
|
40
|
+
|
41
|
+
warning: LF will be replaced by CRLF in app/views/user_mailer/password_reset.text.erb.
|
42
|
+
|
43
|
+
The file will have its original line endings in your working directory
|
44
|
+
|
45
|
+
warning: LF will be replaced by CRLF in db/migrate/20200112080817_add_activation_to_users.rb.
|
46
|
+
|
47
|
+
The file will have its original line endings in your working directory
|
48
|
+
|
49
|
+
warning: LF will be replaced by CRLF in test/controllers/account_activations_controller_test.rb.
|
50
|
+
|
51
|
+
The file will have its original line endings in your working directory
|
52
|
+
|
53
|
+
warning: LF will be replaced by CRLF in test/mailers/previews/user_mailer_preview.rb.
|
54
|
+
|
55
|
+
The file will have its original line endings in your working directory
|
56
|
+
|
57
|
+
warning: LF will be replaced by CRLF in test/mailers/user_mailer_test.rb.
|
58
|
+
|
59
|
+
The file will have its original line endings in your working directory
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
$ git commit -m "Add account activation"
|
64
|
+
|
65
|
+
[account-activation 90ea9d4] Add account activation
|
66
|
+
|
67
|
+
30 files changed, 247 insertions(+), 69 deletions(-)
|
68
|
+
|
69
|
+
create mode 100644 app/assets/javascripts/account_activations.coffee
|
70
|
+
|
71
|
+
create mode 100644 app/assets/stylesheets/account_activations.scss
|
72
|
+
|
73
|
+
create mode 100644 app/controllers/account_activations_controller.rb
|
74
|
+
|
75
|
+
create mode 100644 app/helpers/account_activations_helper.rb
|
76
|
+
|
77
|
+
create mode 100644 app/mailers/user_mailer.rb
|
78
|
+
|
79
|
+
create mode 100644 app/views/user_mailer/account_activation.html.erb
|
80
|
+
|
81
|
+
create mode 100644 app/views/user_mailer/account_activation.text.erb
|
82
|
+
|
83
|
+
create mode 100644 app/views/user_mailer/password_reset.html.erb
|
84
|
+
|
85
|
+
create mode 100644 app/views/user_mailer/password_reset.text.erb
|
86
|
+
|
87
|
+
create mode 100644 db/migrate/20200112080817_add_activation_to_users.rb
|
88
|
+
|
89
|
+
create mode 100644 test/controllers/account_activations_controller_test.rb
|
90
|
+
|
91
|
+
delete mode 100644 test/integration/user_signup_test.rb
|
92
|
+
|
93
|
+
create mode 100644 test/mailers/previews/user_mailer_preview.rb
|
94
|
+
|
95
|
+
create mode 100644 test/mailers/user_mailer_test.rb
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
$ git checkout master
|
100
|
+
|
101
|
+
Switched to branch 'master'
|
102
|
+
|
103
|
+
Your branch is up to date with 'origin/master'.
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
$ git merge account-activation
|
108
|
+
|
109
|
+
$ git merge account-activation
|
110
|
+
|
111
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
112
|
+
|
113
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
114
|
+
|
115
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
116
|
+
|
117
|
+
error: cannot stat 'app/views/user_mailer': Permission denied
|
118
|
+
|
119
|
+
Updating a79ce83..90ea9d4
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
上記エラーのapp/views/user_mailer.rbのコードです。
|
124
|
+
|
125
|
+
↓
|
126
|
+
|
127
|
+
class UserMailer < ApplicationMailer
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
# Subject can be set in your I18n file at config/locales/en.yml
|
132
|
+
|
133
|
+
# with the following lookup:
|
134
|
+
|
135
|
+
#
|
136
|
+
|
137
|
+
# en.user_mailer.account_activation.subject
|
138
|
+
|
139
|
+
#
|
140
|
+
|
141
|
+
def account_activation(user)
|
142
|
+
|
143
|
+
@user = user
|
144
|
+
|
145
|
+
mail to: user.email, subject: "Account activation"
|
146
|
+
|
147
|
+
end
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
# Subject can be set in your I18n file at config/locales/en.yml
|
152
|
+
|
153
|
+
# with the following lookup:
|
154
|
+
|
155
|
+
#
|
156
|
+
|
157
|
+
# en.user_mailer.password_reset.subject
|
158
|
+
|
159
|
+
#
|
160
|
+
|
161
|
+
def password_reset
|
162
|
+
|
163
|
+
@greeting = "Hi"
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
mail to: "to@example.org"
|
168
|
+
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
1
|
-
### 前提・実現したいこと
|
177
|
+
```### 前提・実現したいこと
|
2
178
|
|
3
179
|
現在、Railsチュートリアルの第11章を最終git mergeすると、記述したcodeが全て消え、記述前状態に戻ってしまいます。
|
4
180
|
|