Closed yatish27 closed 9 years ago
I agree this.
@zzak @kgrz How should I replace ruby way or add both way e.g.
This will render ./views/index.erb:
./views/index.erb
<% for post in @posts %> <h1><%= post.title %></h1> <% end %>
You should also be able to do:
<% @posts.each do |post| %> <h1><%= post.title %></h1> <% end %>
I think using each() is more ruby-like, so we should use it.
each()
I agree this.
@zzak @kgrz How should I replace ruby way or add both way e.g.
This will render
./views/index.erb
:You should also be able to do: