I was wondering if it is possible to have an "app controller"?
What I mean is this. You supply a controller for each model. Each controller can define methods to handle different URLs with paths within that model.
BTW, it seems that there are two naming conventions for controllers, either of which will work: you can either call the file just controller.rb, or else e.g. song_controller.rb if your model name were Song. Either one works - you get just controller.rb for Settings, but then when you generate models, the controllers are generated as, e.g. song_controller.rb.
Is one way or the other of naming preferred or deprecated?
So, anyway, there is index.erb directly under /app. Is there some way I can have a controller for that? Maybe add additional .erb files right under /app?
I have been using Settings as a kind of catch-all for some stuff that I have nowhere else to put. Most of it is just controller code, with no .erb. I do have a special .erb I use called /app/Settings/start.erb.
But /app/Settings/start is an awfully inconvenient, unwieldy URL! jQuery Mobile tacks it on to the front of each URL, so you get really long URLS, like:
It clutters the log. It is confusing! I'd like to shorten it.
So, can I have a controller for the .erbs right under /app? Can I just drop more .erbs there, and they will just work? (But, really, I'd like a controller, because I might want to pass them some variables!)
Really, it's more of a rhetorical question, since I am just going to experiment and try it. I'll post my findings as I go. But I figured I'd post here first, and maybe somebody else has done it, and can save me some trouble. Or, if you have done something similar, then maybe I will get some ideas and change my implementation.
It seems to me I have some vague recollection of some discussion of custom paths.
Oh, while I am at it, I will ask a stupid question that probably doesn't deserve a separate post, and is somewhat related. What's up with Settings? If I actually populate a Settings model (can I?) then the collection is Settingss? In a previous project, I created a Configuration model, just because the idea of Settingss bothered me so much! Yes, I have Configurations, because I allow the storage of multiple user configurations (or you might to prefer to call them profiles).
In yet a different project (I didn't do it! I got it that way!) we cluttered RhoConfig with user settings. Yuck. We finally added a prefix to all of our custom RhoConfig settings, to avoid any possible conflict.