From 5d15e2c806c9664a18ed6ff6a6523b756fb942d6 Mon Sep 17 00:00:00 2001 From: Yong Gu Date: Thu, 15 Jan 2015 01:08:49 +0800 Subject: [PATCH] Auto corrected by following Lint/DeprecatedClassMethods --- app/controllers/devise_controller.rb | 8 ++++---- lib/generators/devise/orm_helpers.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/devise_controller.rb b/app/controllers/devise_controller.rb index 7ad38b82be..957fe99ed4 100644 --- a/app/controllers/devise_controller.rb +++ b/app/controllers/devise_controller.rb @@ -88,7 +88,7 @@ def require_no_authentication no_input = devise_mapping.no_input_strategies authenticated = if no_input.present? - args = no_input.dup.push :scope => resource_name + args = no_input.dup.push :scope => resource_name warden.authenticate?(*args) else warden.authenticated?(resource_name) @@ -106,10 +106,10 @@ def require_no_authentication # and instructions were sent. def successfully_sent?(resource) notice = if Devise.paranoid - resource.errors.clear + resource.errors.clear :send_paranoid_instructions elsif resource.errors.empty? - :send_instructions + :send_instructions end if notice @@ -161,7 +161,7 @@ def is_navigational_format? # Override prefixes to consider the scoped view. def _prefixes #:nodoc: @_prefixes ||= if self.class.scoped_views? - super.unshift("#{devise_mapping.scoped_path}/#{controller_name}") + super.unshift("#{devise_mapping.scoped_path}/#{controller_name}") else super end diff --git a/lib/generators/devise/orm_helpers.rb b/lib/generators/devise/orm_helpers.rb index 644f83d11d..f4548796a4 100644 --- a/lib/generators/devise/orm_helpers.rb +++ b/lib/generators/devise/orm_helpers.rb @@ -12,7 +12,7 @@ def model_contents end def model_exists? - File.exists?(File.join(destination_root, model_path)) + File.exist?(File.join(destination_root, model_path)) end def migration_exists?(table_name)