title: Rails: Syntaxerror - Unexpected '{' in sessionscontroller
body: <p>I have cloned a quiz app project from this repo: <a href="https://github.com/Pk13055/quiz-app" rel="noreferrer">https://github.com/Pk13055/quiz-app</a></p>
  
  <p>I am trying to run it from my system by using this command: </p>
  
  <p><code>rails server</code></p>
  
  <p>But I am getting this error:</p>
  
  <pre><code>/home/laxmanrm/.rvm/gems/ruby-2.6.0/gems/devise-4.3.0/app/controllers/devise/sessions_controller.rb:5: syntax error, unexpected '{', expecting end ...ion only: [:create, :destroy] { request.env["devise.skip_tim... ... ^ /home/laxmanrm/.rvm/gems/ruby-2.6.0/gems/devise-4.3.0/app/controllers/devise/sessions_controller.rb:5: syntax error, unexpected '}', expecting end ..."devise.skip_timeout"] = true } ... ^
  Extracted source (around line #5):
  
    prepend_before_action :allow_params_authentication!, only: :create
    prepend_before_action :verify_signed_out_user, only: :destroy
    prepend_before_action only: [:create, :destroy] { request.env["devise.skip_timeout"] = true }
  
    # GET /resource/sign_in
    def new
  </code></pre>
  
  <p>How can I rectify this error and make the application run?</p>
  
  <p><strong>sessions_controller.rb</strong></p>
  
  <pre><code>class Devise::SessionsController &lt; DeviseController
    prepend_before_action :require_no_authentication, only: [:new, :create]
    prepend_before_action :allow_params_authentication!, only: :create
    prepend_before_action :verify_signed_out_user, only: :destroy
    prepend_before_action only: [:create, :destroy] { request.env["devise.skip_timeout"] = true }
  
    # GET /resource/sign_in
    def new
      self.resource = resource_class.new(sign_in_params)
      clean_up_passwords(resource)
      yield resource if block_given?
      respond_with(resource, serialize_options(resource))
    end
  </code></pre>