Skip to content

Commit

Permalink
Fix syntax for MRI 2.5.0-preview1.
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Oct 12, 2017
1 parent 71fc5b3 commit 1009096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/devise/sessions_controller.rb
Expand Up @@ -2,7 +2,7 @@ class Devise::SessionsController < 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 }
prepend_before_action(only: [:create, :destroy]) { request.env["devise.skip_timeout"] = true }

# GET /resource/sign_in
def new
Expand Down

5 comments on commit 1009096

@lisovskyvlad
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great!

@dvodvo
Copy link

@dvodvo dvodvo commented on 1009096 Dec 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting the undefined method 'unshift' for nil:NilClass error popping up after a ruby upgrade, albeit with a lower Rails version.

...ion only: [:create, :destroy] { request.env["devise.skip_tim... ... ^ /Users/deploy/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/devise-4.2.0/app/controllers/devise/sessions_controller.rb:5: syntax error, unexpected '}', expecting keyword_end ..."devise.skip_timeout"] = true }
As my guilty code states skip_before_filter :authenticate_user!, :only => [:create, :new] it appears that my devise code has not the above change implemented. How can I go about resolving this?

@pat
Copy link
Contributor Author

@pat pat commented on 1009096 Dec 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dvodvo it looks like you're using Devise 4.2.0, and this fix was part of the 4.4.0 release, so you'll need to update to that :)

@kirantpatil
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am getting this issue on Devise 4.6.2 still but resolved after changing to 4.4.3.

Is it regression bug in version 4.6.2 ?

@tegon
Copy link
Member

@tegon tegon commented on 1009096 Aug 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kirantpatil I don't think so, but it might be a different issue. Do you mind the open a new issue for that?

Please sign in to comment.