title: How to pass some parameters to the default rendering method?
body: <p>I am using Ruby on Rails 3.0.10 and I would like to pass some parameters to the default rendering method. That is, if I have a code like</p>
  
  <pre><code>def show
    ...
  
    respond_to do |format|
      format.html # This, by default, renders the 'show.html.erb' file
     end
  end
  </code></pre>
  
  <p>I would like to pass some parameters, maybe like (note: the following doesn't work)</p>
  
  <pre><code>def show
    ...
  
    respond_to do |format|
      # Here I would like to add some local objects that will be available in the 'show.html.erb' template file
      format.html { render ..., :locals =&gt; { :content =&gt; { :value =&gt; 'Sample value' } } }
     end
  end
  </code></pre>
  
  <p>so that in the <code>show.html.erb</code> template I can make something like:</p>
  
  <pre><code>&lt;%=
    content[:value]
    # =&gt; 'Sample value'
  %&gt;
  </code></pre>
  
  <p>In few words, <em>I would like to pass parameter values in the same way as made for partial template rendering related to the <code>:locals</code> key</em>:</p>
  
  <pre><code>render :partial, 
         :locals =&gt; {
            :content =&gt; { :value =&gt; 'Sample value' }
         }
  </code></pre>
  
  <p><strong>How can I do that?</strong></p>