Open jlebrech opened 11 years ago
If you define current_user
as an attribute or instance method of LoginApp, then you couldn't do that easily. You could define it as a method on your wrapping module, or even create a singleton class outside the scope of either of your Sinatra subclasses to track it. You could also create a class level method on LoginApp, and then call LoginApp.current_user from your BlogApp to get access to the information. Obviously none of these are straightforward solutions, but it's certainly possible.
Do main and blog share data?
For example if I have a login app and a blog app, could I get the blog app to find the current_user from login app?