Search code examples
rhomobilerhodes

Starting controller for Rhomobile ?


What is the starting point for my Rhodes mobile application , the way I understand it , that Rhodes is an MVC based framework, let's assume that when I start the application, I will need to make some validation before deciding which is the appropriate view to show, like as for example if the user is an admin then I will need to show admin view .

I can't find the main controller to do such a thing, all what I can see is index.erb, but what I'm trying to find is the main controller to decide if i'm going to use index.erb or any other view .

I'm sure there must be work around to do that, please note that i'm very new to Rhomobile .


Solution

  • Please check how to use the rhoconfig.txt so that you can set what Controller you would like to call when app start.

    http://docs.rhomobile.com/rhodes/configuration#run-time-configuration

    You can then write your own logic for handling users.

    You can also point to app/Settings/login so that you can handle the logic in do_login method