views:

14

answers:

1

In certain situations I run my app in a context like: /context/app , but sometimes I only use: /app

In my DB I have an applications table that has an attribute for the path of the application (ex. /app ), what Im looking is that my app could determine in wich context is running in order to update that attribute (ex. /context/app)

I think is a rack thing but I dont know how can I ask him for that information.

The context is set through passenger using RailsBaseURI.

A: 

Does

RAILS_ROOT

give you what you need? It should return the root of the application.

If this isn't what you are after then I think more information is needed about what you are trying to do.

Oliver
Thanks Oliver but RAILS_ROOT does not solve my problem since RAILS_ROOT works in File System level and what I need is something that inspect the context in an url.
ricardohead