title: Action that refreshes the current page
body: <p>I want to create an action in a Rails controller that does something in the db and then just refreshes the current page.</p>
  
  <p>Example:<br>
  Controller: A<br>
  Views: A, B.</p>
  
  <p>controller A is the following: </p>
  
  <pre><code>def action1
      somethingToTheDB
  end
  </code></pre>
  
  <p>view A is the following:</p>
  
  <pre><code>-html-
  -body--link to action 1--/body-
  -/html-
  </code></pre>
  
  <p>view B is the following</p>
  
  <pre><code>-html-
  -body--link to action 1--/body-
  -/html-
  </code></pre>
  
  <p>If I come to action 1 from view A I want to refresh view A, if I come from view 2 I want to refresh view 2. Is that possible without passing a parameter in the link to indicate the view that must be rendered?</p>
  
  <p>Thanks</p>