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/27-replace-instance-variable-with-local-variable
Before:
class PostsController < ApplicationController def show @post = Post.find(params[:id]) end end <%= render :partial => "sidebar" %>
After:
<%= render :partial => "sidebar", :locals => { :post => @post } %>
This is a clean way nowadays
<%= render "sidebar", :post => @post %>