title: Rails: How to verify if cookie session is valid from Controller
body: <p>how do Rails verify a session cookie like this request header?</p>
  <pre><code>Cookie: _user_session_id=dd74604fbe1b5f2144af238b05186d80; user=VnlYQ0o5TEZ3aGMzUkJjM05wY---etc-etc-etc
  </code></pre>
  <p>I have my client sending this cookie in the HTTP request headers, how do I validate that in RoR inside my controller?</p>
  <p>I've seen some links where people were using a <code>before_action: validate_credentials</code> and that was a method where they validate the JWT token, in my case, it's just a cookie, how do I check that <code>session[:user_id]</code> matches the <code>_user_session_id</code> from the cookie?</p>
  <p>my goal here is to allow a request to go through if the cookie is valid</p>