From 0e181cb83de916bc5d22b60d7f21cf961625eaed Mon Sep 17 00:00:00 2001 From: "dmitrij.ivanchenko" Date: Thu, 18 Apr 2019 08:34:33 +0600 Subject: [PATCH] Replace before_filter to before_action --- README | 2 +- lib/active_device.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 65b402e..899b46a 100755 --- a/README +++ b/README @@ -37,7 +37,7 @@ Then add the line below to config/initializers/mime_types.rb For Skiping setting the Format to :mobile Add this line to your Application Controller - skip_before_filter :set_mobile_format + skip_before_action :set_mobile_format Example ======= diff --git a/lib/active_device.rb b/lib/active_device.rb index fcf33ec..ae827e8 100755 --- a/lib/active_device.rb +++ b/lib/active_device.rb @@ -34,9 +34,9 @@ module ActiveDevice include ActiveDevice::Helper - + def self.included(base) - base.before_filter :set_mobile_format + base.before_action :set_mobile_format base.helper_method :is_mobile_device?, :is_mobile_browser?, :is_desktop_browser?, :is_bot? base.helper_method :is_mobile_view? base.helper_method :is_device?, :is_handset?, :is_brand?, :is_model?, :is_os?, :is_engine?, :is_browser?