Running Rails+Passenger+Devise from a subdirectory?
In your environment files, add a config for OmniAuth.config.full_host
.
OmniAuth.config.full_host = 'http://myfullurl/subdir'
Now, in application_controller.rb
, add this method:
def after_sign_in_path_for(resource_or_scope) path = super(resource_or_scope) "#{OmniAuth.config.full_host}#{path}"end
Would be great if you share your routes.rb
, but I think the easy way to change devise routes is to put something like the following in routes.rb
scope '/rails' do devise_for :usersend