ruby on rails - Does anyone know the options for Devises `authenticate_user!`? -



ruby on rails - Does anyone know the options for Devises `authenticate_user!`? -

like title says, i'm looking options devises automatic class authenticate_user!, specifically, want redirect_to '/' , not '/users/sign_in'

do following:

in config/initializers/devise.rb:

config.warden |manager| manager.failure_app = customauthenticationfailure end

create new file called lib/custom_authentication_failure.rb:

class customauthenticationfailure < devise::failureapp protected def redirect_url root_path #or whatever route in app points '/' end end

and config/application.rb:

config.autoload_paths += %w(#{config.root}/lib)

ruby-on-rails authentication user devise

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -