質問編集履歴

2

application.html追加

2019/08/10 05:17

投稿

lucky_luci
lucky_luci

スコア18

test CHANGED
File without changes
test CHANGED
@@ -106,4 +106,152 @@
106
106
 
107
107
  </head>
108
108
 
109
+ <tbody>
110
+
111
+ <div class ="wrap">
112
+
113
+
114
+
115
+
116
+
117
+ <% if user_signed_in? %>
118
+
119
+ <header>
120
+
121
+ <tr>
122
+
123
+ <% if @g_infos.present? %>
124
+
125
+ <% @g_infos.each do |g_info| %>
126
+
127
+ <div class = "dropdown-header">
128
+
129
+ <ul class ="responsive-menu"><i class="fas fa-bars"></i></ul>
130
+
131
+ <div class ="dropdown-content-header">
132
+
133
+ <td><%= link_to 'Mypage', g_info_path(g_info.id) %></td>
134
+
135
+ <a href="#">Chat</a>
136
+
137
+ <td><%= link_to 'News', news_path(g_info.id) %></td>
138
+
139
+ <td><%= link_to 'Q&A', questions_path %></td>
140
+
141
+ <td><%= link_to "LOGOUT", logout_path %></td>
142
+
143
+ </div>
144
+
145
+ </div>
146
+
147
+ <ul class ="logo"><a href="/g_infos">JAPA<span>N</span>IGHT</a></ul>
148
+
149
+
150
+
151
+ <ul class ="header-username"><%= g_info.name %></ul>
152
+
153
+ <ul class ="mypagecommand"><%= link_to 'Mypage', g_info_path(g_info.id) %></ul>
154
+
155
+ <ul ul class ="mypagecommand"><a href="#">Chat</a></ul>
156
+
157
+ <ul class ="mypagecommand"><%= link_to 'News', news_path(g_info.id) %></ul>
158
+
159
+ <ul class ="mypagecommand"><%= link_to 'Q&A', questions_path %></ul>
160
+
161
+ <ul class ="mypagecommand"><%= link_to "LOGOUT", logout_path %></ul>
162
+
163
+ <% end %>
164
+
165
+ <% end %>
166
+
167
+ </tr>
168
+
169
+ </header>
170
+
171
+ <% end %>
172
+
173
+ <% if current_user == nil %>
174
+
175
+ <header>
176
+
177
+ <tr>
178
+
179
+ <div class = "dropdown-header">
180
+
181
+ <ul class ="responsive-menu"><i class="fas fa-bars"></i></ul>
182
+
183
+ <div class ="dropdown-content-header">
184
+
185
+ <%= link_to 'SIGNUP' ,new_guide_path %>
186
+
187
+ <a href="#">LOGIN</a>
188
+
189
+ </div>
190
+
191
+ </div>
192
+
193
+ <ul class ="logo"><a href="/g_infos">JAPA<span>N</span>IGHT</a></ul>
194
+
195
+ <ul class ="login"><%= link_to 'LOGIN', login_path %></ul>
196
+
197
+ </tr>
198
+
199
+ </header>
200
+
201
+ <% end %>
202
+
203
+
204
+
205
+
206
+
207
+ <%= yield %>
208
+
209
+
210
+
211
+ <footer> 
212
+
213
+ <ul class ="logo"><a href="">JAPA<span>N</span>IGHT</a></ul>
214
+
215
+ <img src = "/assets/town.png" class ="town-ill"></img>
216
+
217
+ <wrapper class ="footer-wrapper">
218
+
219
+ <ul class ="footer-list"><a href ="">HELP</a></ul>
220
+
221
+ <ul class ="footer-list"><a href ="">CONTACT</a></ul>
222
+
223
+ <ul class ="footer-list"><%= link_to 'COMPANY', outline_info_company_path %></ul>
224
+
225
+ <ul class ="footer-list"><a href ="">OUR PHILOSOPHY</a></ul>
226
+
227
+ <ul class ="footer-list"><a href ="">TERMS OF USE</a></ul>
228
+
229
+ <ul class ="footer-list"><a href ="">SPECIAL COMMERCIAL CODE</a></ul>
230
+
231
+ <ul class ="footer-list"><a href ="">PRIVACY POLICY</a></ul>
232
+
233
+ </wrapper>
234
+
235
+ </footer>
236
+
237
+
238
+
239
+ </div>
240
+
241
+ </tbody>
242
+
243
+ <%= javascript_include_tag "http://code.jquery.com/jquery-2.2.3.min.js" %>
244
+
245
+ <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" %>
246
+
247
+ <%= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js" %>
248
+
249
+ <%= javascript_include_tag "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js" %>
250
+
251
+ <%= javascript_include_tag "http://code.jquery.com/jquery-1.8.1.min.js" %>
252
+
253
+
254
+
255
+ </html>
256
+
109
257
  ```

1

タイトル要件、シンタックスハイライト、エラー文翻訳修正追加

2019/08/10 05:17

投稿

lucky_luci
lucky_luci

スコア18

test CHANGED
@@ -1 +1 @@
1
- rails javascriptが動かないです。助けてください。
1
+ rails javascriptが実行されない
test CHANGED
@@ -2,19 +2,27 @@
2
2
 
3
3
  うまく動きません。このようなメッセージが出ています。
4
4
 
5
- ou are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!
5
+ you are loading Turbolinks from a <script> element inside the <body> element. This is probably not what you meant to do!
6
6
 
7
7
 
8
8
 
9
9
  Load your application’s JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change
10
10
 
11
+ 翻訳
11
12
 
13
+ <body>要素内の<script>要素からTurbolinksをロードしています。これはおそらく、あなたが意図したことではないでしょう!
14
+
15
+
16
+
17
+ 代わりに、アプリケーションのJavaScriptバンドルを<head>要素内にロードします。 <body>の<script>要素は、ページが変更されるたびに評価されます
12
18
 
13
19
  コード
14
20
 
15
21
  **show.html.erb**
16
22
 
17
23
 
24
+
25
+ ```ここに言語を入力
18
26
 
19
27
  <div id="mypage">
20
28
 
@@ -70,9 +78,13 @@
70
78
 
71
79
  })();
72
80
 
81
+ ```
82
+
73
83
 
74
84
 
75
85
  **application.html.erb**
86
+
87
+ ```ここに言語を入力
76
88
 
77
89
  <head>
78
90
 
@@ -93,3 +105,5 @@
93
105
  <%= javascript_include_tag "jsfile.js" %>
94
106
 
95
107
  </head>
108
+
109
+ ```