Skip to content

Commit 4308817

Browse files
fix "filter" callbacks
1 parent f6d8424 commit 4308817

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ mount OpenSesame::Engine => OpenSesame.mount_prefix
5151
Place the following in your application_controller:
5252

5353
```ruby
54-
before_filter :authenticate_opensesame!
54+
before_action :authenticate_opensesame!
5555
```

app/controllers/open_sesame/sessions_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module OpenSesame
22
class SessionsController < OpenSesame::ApplicationController
33

4-
skip_before_filter :authenticate_opensesame!
4+
skip_before_action :authenticate_opensesame!, raise: false
55
skip_authorization_check if defined?(CanCan)
6-
before_filter :attempt_auto_authenticate, :only => :new
7-
after_filter :clear_auto_attempt!, :only => :create
6+
before_action :attempt_auto_authenticate, :only => :new
7+
after_action :clear_auto_attempt!, :only => :create
88

99
def new
1010
if error_message
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class ApplicationController < ActionController::Base
22
protect_from_forgery
33

4-
before_filter :authenticate_opensesame!
4+
before_action :authenticate_opensesame!
55
end

0 commit comments

Comments
 (0)