I am new to Rails, so this might be a stupid question.
However, neither browsing the available online documentation nor
solved my problem.
I have a “legacy” database that is supposed to be accessed both by
GUI programs (currently implemented in wxPython) and as well as a web
User authentication and role based authorization is now all handled by
backend (Postgresql) and I want to keep it that way so that nobody in
app can accidentally access records that they are not supposed to
so that I don’t have to duplicate work in both GUI app and web app re
1.) How do I (in RoR) log into a database backend as a specific user
given password per session? I guess there must be a model base class
implement this and then derive all further models from this one?
2.) How do I gracefully react to authentication errors coming from the
PostgreSQL backend in RoR?
(both so easy in Python+ wxPython which I am used to, but I have no idea
to do it in RoR - I would be most grateful for any help)