質問編集履歴
1
上記ファイルの追加と、追加したファイルに関する、turbolinksの記述は削除しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -20,10 +20,103 @@
|
|
20
20
|
<% end %>
|
21
21
|
```
|
22
22
|
|
23
|
+
```
|
24
|
+
gemfile
|
23
25
|
|
26
|
+
# Use CoffeeScript for .coffee assets and views
|
27
|
+
gem 'coffee-rails', '~> 4.2'
|
28
|
+
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
29
|
+
# gem 'turbolinks', '~> 5'
|
30
|
+
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
31
|
+
gem 'jbuilder', '~> 2.5'
|
32
|
+
# Use Redis adapter to run Action Cable in production
|
33
|
+
# gem 'redis', '~> 4.0'
|
34
|
+
# Use ActiveModel has_secure_password
|
35
|
+
# gem 'bcrypt', '~> 3.1.7'
|
24
36
|
|
37
|
+
# Use ActiveStorage variant
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
```
|
42
|
+
applocation.html
|
43
|
+
|
44
|
+
<!DOCTYPE html>
|
45
|
+
<html>
|
46
|
+
<head>
|
47
|
+
<title>BookApp</title>
|
48
|
+
<%= csrf_meta_tags %>
|
49
|
+
<%= csp_meta_tag %>
|
50
|
+
|
51
|
+
<%= stylesheet_link_tag 'application', media: 'all' %>
|
52
|
+
<%= javascript_include_tag 'application' %>
|
53
|
+
<link href="https://fonts.googleapis.com/css?family=Ravi+Prakash" rel="stylesheet">
|
54
|
+
</head>
|
55
|
+
|
56
|
+
<body>
|
57
|
+
|
58
|
+
|
59
|
+
<div class="header">
|
60
|
+
<% if user_signed_in? %>
|
61
|
+
<span>
|
62
|
+
<img src="<%= current_user.image %>" class = "header__img">
|
63
|
+
<h2><%= link_to current_user.name, "/users/#{current_user.id}" %></h2>
|
64
|
+
</span>
|
65
|
+
<h1><%= link_to "BOOKLovers", root_path %></h1>
|
66
|
+
<ul class="user__info">
|
67
|
+
<li>
|
68
|
+
<%= link_to "users", users_path %>
|
69
|
+
<%= link_to "new_page", new_book_path %>
|
70
|
+
<%= link_to "log_out", destroy_user_session_path, method: :delete, data: { confirm: 'ログアウトしますか?' } %>
|
71
|
+
</li>
|
72
|
+
</ul>
|
73
|
+
<% else %>
|
74
|
+
<h1 class = "header__logo"><%= link_to "BOOKLovers", root_path %></h1>
|
75
|
+
<ul class="user__info">
|
76
|
+
<li>
|
77
|
+
<%= link_to "users", users_path %>
|
78
|
+
<%= link_to "sgin_up", new_user_registration_path %>
|
79
|
+
<%= link_to "log_in", new_user_session_path %>
|
80
|
+
</li>
|
81
|
+
</ul>
|
82
|
+
<% end %>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<%= yield %>
|
88
|
+
</body>
|
89
|
+
</html>
|
90
|
+
|
91
|
+
```
|
92
|
+
```
|
93
|
+
aplication.js
|
94
|
+
|
95
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
96
|
+
// listed below.
|
97
|
+
//
|
98
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
|
99
|
+
// vendor/assets/javascripts directory can be referenced here using a relative path.
|
100
|
+
//
|
101
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
102
|
+
// compiled file. JavaScript code in this file should be added after the last require_* statement.
|
103
|
+
//
|
104
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
105
|
+
// about supported directives.
|
106
|
+
//
|
107
|
+
//= require jquery
|
108
|
+
//= require rails-ujs
|
109
|
+
//= require activestorage
|
110
|
+
//= require_tree .
|
111
|
+
|
112
|
+
|
113
|
+
```
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
25
118
|
### 試したこと
|
26
|
-
|
119
|
+
追加したファイルに関する、turbolinksの記述は削除しました。
|
27
120
|
|
28
121
|
|
29
122
|
### 補足情報(FW/ツールのバージョンなど)
|