We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Please go to http://rails-bestpractices.com/posts/24-move-code-into-controller
Before:
<% @posts = Post.find(:all) %> <% @posts.each do |post| %> <%=h post.title %> <%=h post.content %> <% end %>
After:
class PostsController < ApplicationController def index @posts = Post.find(:all) end end