title: Rails: How do you call 'update' from another action
body: <p>In my rails app, I have an action (def do_some_stuff) but I would first like to update my post before doing so &amp; if it's successful, it'll finishing "doing stuff"... Simple, right? </p>
  
  <p>Here's my action</p>
  
  <pre><code>def do_some_stuff
    Rails.logger.debug "Post id is #{@post.id}"
    update #calls the update action
    ## does some stuff
  end
  </code></pre>
  
  <p>Instead of updating, Rails is throwing me this error: "Required parameter missing: post" (meaning 'post' is nil, right?)</p>
  
  <p>I'm getting the post id in my logger but for some reason it gives me that error.</p>
  
  <p>To make things simpler, I decided to just try to call the update action in the 'do_some_stuff' action.. I'm using strong_params btw</p>
  
  <p>How do I call the "update" action from another action?</p>
  
  <p>Thank you in advance. Any help would be greatly appreciated.</p>
  
  <hr>
  
  <p>I typed this on my phone so sorry in advance for any typos</p>
  
  <hr>
  
  <p>my log:
  Processing by PostsController#do_some_stuff as HTML
  Parameters: id = 149</p>