diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-27 22:21:45 +0100 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2021-03-27 22:21:45 +0100 |
commit | a6b11a3bf098c673b7f1142be60f04a00885f5a7 (patch) | |
tree | a7ffb48467763708a076b6b9fe0ca6e590e1116e /src | |
parent | 734687cad0d439cc90551be2e82bdd61280a07d6 (diff) |
Use - trimming in ERB
Diffstat (limited to 'src')
-rw-r--r-- | src/blog.html.erb | 4 | ||||
-rw-r--r-- | src/index.html.erb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/blog.html.erb b/src/blog.html.erb index 7fb308e..c5ccee2 100644 --- a/src/blog.html.erb +++ b/src/blog.html.erb @@ -2,9 +2,9 @@ Subscribe with <a href='<%= path_to 'rss' %>'>RSS</a> </p> <ul> -<% posts.each do |post| %> +<% posts.each do |post| -%> <li> <a href=<%= path_to post['id'] %>><%= post['title'] %></a> <%= format_date post['date'] %> </li> -<% end %> +<% end -%> </ul> diff --git a/src/index.html.erb b/src/index.html.erb index 536b15a..414b201 100644 --- a/src/index.html.erb +++ b/src/index.html.erb @@ -8,11 +8,11 @@ <h2>Recent posts <a style='font-size: 18px;' href='<%= path_to 'rss' %>'>(RSS)</a>:</h2> <ul> -<% posts.take(5).each do |post| %> +<% posts.take(5).each do |post| -%> <li> <a href='<%= path_to post['id'] %>'><%= post['title'] %></a> <%= format_date post['date'] %> </li> -<% end %> +<% end -%> </ul> <hr /> |