質問編集履歴

3

viewの追加

2021/11/01 11:21

投稿

TN_takashi
TN_takashi

スコア2

test CHANGED
File without changes
test CHANGED
@@ -20,11 +20,25 @@
20
20
 
21
21
 
22
22
 
23
- contrller
23
+ * contrller
24
24
 
25
25
  ```
26
26
 
27
27
  flash[:notice] = "詳しくは#{view_context.link_to "こちら", "#"}"
28
+
29
+ ```
30
+
31
+
32
+
33
+ * view
34
+
35
+ ```
36
+
37
+ - if flash[:notice]
38
+
39
+ %p.alert.alert-info.alert-dismissible
40
+
41
+ = notice
28
42
 
29
43
  ```
30
44
 

2

不確定な情報の削除

2021/11/01 11:21

投稿

TN_takashi
TN_takashi

スコア2

test CHANGED
File without changes
test CHANGED
@@ -30,26 +30,6 @@
30
30
 
31
31
 
32
32
 
33
- view
34
-
35
- ```
36
-
37
- - if flash[:notice]
38
-
39
- %p.alert.alert-info.alert-dismissible
40
-
41
- = notice
42
-
43
- %button{type: "button", class: "close", "data-dismiss"=>"alert", "aria-label"=>"Close"}
44
-
45
- %span{"aria-hidden"=>"true"}
46
-
47
- ×
48
-
49
- ```
50
-
51
-
52
-
53
33
  ### 試したこと
54
34
 
55
35
  controllerにviewのヘルパーメソッドを使う方法が

1

viewの追加

2021/10/31 10:38

投稿

TN_takashi
TN_takashi

スコア2

test CHANGED
File without changes
test CHANGED
@@ -20,9 +20,31 @@
20
20
 
21
21
 
22
22
 
23
+ contrller
24
+
23
- ```rails
25
+ ```
24
26
 
25
27
  flash[:notice] = "詳しくは#{view_context.link_to "こちら", "#"}"
28
+
29
+ ```
30
+
31
+
32
+
33
+ view
34
+
35
+ ```
36
+
37
+ - if flash[:notice]
38
+
39
+ %p.alert.alert-info.alert-dismissible
40
+
41
+ = notice
42
+
43
+ %button{type: "button", class: "close", "data-dismiss"=>"alert", "aria-label"=>"Close"}
44
+
45
+ %span{"aria-hidden"=>"true"}
46
+
47
+ ×
26
48
 
27
49
  ```
28
50