title: How to pass variable to render in controller method in Rails
body: <p>I am trying to pass a variable to render like this:</p>
  
  <pre><code>def monitor
    @peripheries = Periphery.where('periphery_type_name=?','monitor')
    render 'index', type: 'Monitor'
  end
  </code></pre>
  
  <p>Here i want to use 'type' variable inside index view which looks like that:</p>
  
  <pre><code>&lt;%= render 'some_partial', periphery_type: type %&gt;
  </code></pre>
  
  <p>which also render something. But i want to use that 'type' variable</p>