How can one use the rails environment variables within the application?
I am trying to use them to limit access to certain elements on the page. E.g. the users do not see the information an admin does; but the rest of the page is the same. Is there a best practice for such user privilege implementations?
You can use an environmental variable like this:
This is an example of what would be in your database.yml. However, like the above user stated, it would be better to put the logic in your view rather than using an environmental variable.