質問編集履歴

2

文法修正

2017/07/15 02:16

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -1,13 +1,3 @@
1
- | 補足 | 内容 |
2
-
3
- | :------------- | :------------- |
4
-
5
- | birth_year | 西暦の生年です。ex)2000 |
6
-
7
-
8
-
9
-
10
-
11
1
  「現在西暦」と「生まれ年(西暦)」の差を求め、
12
2
 
13
3
  年齢を表記したいのですが、
@@ -16,7 +6,7 @@
16
6
 
17
7
  ```
18
8
 
19
- table.table.table-hover.col-lg-12
9
+ table
20
10
 
21
11
  thead ...略....
22
12
 
@@ -34,6 +24,16 @@
34
24
 
35
25
 
36
26
 
27
+ | 補足 | 内容 |
28
+
29
+ | :------------- | :------------- |
30
+
31
+ | birth_year | 西暦の生年です。ex)2000 |
32
+
33
+
34
+
35
+
36
+
37
37
 
38
38
 
39
39
  今のままの`slim`だと

1

文法修正

2017/07/15 02:16

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -18,23 +18,17 @@
18
18
 
19
19
  table.table.table-hover.col-lg-12
20
20
 
21
- thead
21
+ thead ...略....
22
22
 
23
- tr
23
+ tbody
24
24
 
25
- th #{fa_icon 'gender' ,class:'fa-fw'}性別
25
+ - @users.each do |user|
26
26
 
27
- th #{fa_icon 'clock-o' ,class:'fa-fw'}年齢
27
+ tr
28
28
 
29
- tbody
29
+ td #{user.gender == "0" ? "男性": "女性"}
30
30
 
31
- - @users.each do |user|
32
-
33
- tr
34
-
35
- td #{user.gender == "0" ? "男性": "女性"}
36
-
37
- td #{Date.current.strftime("%Y")}-#{user.birth_year} ←★ココです。
31
+ td #{Date.current.strftime("%Y")}-#{user.birth_year} ←★ココです。
38
32
 
39
33
  ```
40
34