Rails same app with different databases -


i'm building report app in rails current desktop app. app kind of pos/accounting.

so @ moment there different clients desktop app installed @ shop or office. each 1 has own mysql database.

i planning how setup server, heroku.

given keep databases each client separated, i'm trying understand best path follow.

another thing consider there different version of app, i.e. restaurant, bar, shop etc.. different versions use same database. i'll need change controller , view. i'll handle using namespace.

for client(company) multiple users have access app.

the solution thought create database table company , add column company users table.

things change client another:

  • call different images assets such logo
  • there might custom views or controller if client requests customization
  • use different database
  • domain possibly, that's not important wouldn't a big deal use same

then based on user.company show different logo or other required image, render view instead of another, @ login connect proper database.

i don't know yet how implement it, right i'm still evaluating best approach follow. way maintenance/updates easy manage if maybe performance bit lower , code harder understand possible customizations that's acceptable.

is reasonable solution or should consider different? missing important consider?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -