From 7adf95b945be9aceba7ecf18d66f317ffd47acba Mon Sep 17 00:00:00 2001 From: Yasserius Date: Sun, 30 Mar 2014 00:52:00 +0600 Subject: [PATCH] before_filter turned into before_action --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 38e674bf..35c16abd 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,10 @@ You should restart your application after changing Devise's configuration option ### Controller filters and helpers -Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_filter: +Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_action: ```ruby -before_filter :authenticate_user! +before_action :authenticate_user! ``` To verify if a user is signed in, use the following helper: @@ -157,7 +157,7 @@ You can also override `after_sign_in_path_for` and `after_sign_out_path_for` to Notice that if your Devise model is called `Member` instead of `User`, for example, then the helpers available are: ```ruby -before_filter :authenticate_member! +before_action :authenticate_member! member_signed_in? @@ -190,7 +190,7 @@ In case you want to permit additional parameters (the lazy way™) you can do wi ```ruby class ApplicationController < ActionController::Base - before_filter :configure_permitted_parameters, if: :devise_controller? + before_action :configure_permitted_parameters, if: :devise_controller? protected