title: Check if user signed in before any action in Rails
body: <p>I want to execute some function before any controller action to check if the user is signed in. I am using <code>devise</code> so that I can use <code>is_signed_in?</code>, but I have to put if else condition to every method in the controller.</p>
  
  <p>What I want is to have something like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>#some_controller.rb
  before_action :is_signed_in?
  
  def is_signed_in?
     if !user_signed_in?
        redirect_to new_user_session_path
     else 
        ..proceed to the action intended to call
     end
  end</code></pre>
  </div>
  </div>
  
  So I want this method to execute before any action (or some set of actions) and redirect to sign in if false or let that action to be executed if true.</p>