neerajsingh0101 / admin_data

A non instrusive gem which helps you browse, search and manage your data using browser
http://admin-data-demo.heroku.com/admin_data
MIT License
376 stars 56 forks source link

Support RAILS_RELATIVE_URL_ROOT in routes for Rails apps running in a subdirectory #75

Closed adamcrown closed 13 years ago

adamcrown commented 13 years ago

I've added a scope for the RAILS_RELATIVE_URL_ROOT environment variable. This is needed in Rails 3 if an app is running in a subdirectory instead of it's own domain.

neerajsingh0101 commented 13 years ago

Hi Adam,

Can you describe what you mean by "running app in a subdirectory"?

Thanks

adamcrown commented 13 years ago

If you run your app at example.com, everything works fine. But if you run your app at example.com/rails_app admin_data's routes still expect it to be run at example.com/admin_data instead of example.com/rails_app/admin_data so it doesn't work. This patch should allow either to work.

neerajsingh0101 commented 13 years ago

makes sense.

I will run a quick test and will merge it soon.

Thanks for quick feedback.

neerajsingh0101 commented 13 years ago

Opening this ticket for documentation. The feature brought in this ticket should be documented.