As an experiment, I've been playing with this today (and getting file
extensions wrong!), and have got a really simple version of this to
work.Basically
I have an extant app that requires a login, and uses table-based sessions.
I created the sub-app as another Rails app, then took the following steps:

* Made symlinks to the original models I would need in the new app (namely
User and Role) in the models folder.
* Replaced the new database.yml file with a symlink to the original
database.yml file.
* Replaced the new db/ folder with a symlink to the original db/ folder.
* Set the new app to use database sessions in its environment.rb file.
* Copied the authentication method & before_filter from the original
application controller to the new one.

& it works a treat, so far!
Obviously this is only a very simple & fairly restrictive solution, but it
works for my current needs. I guess you could set up redirected tables in
MySQL if you couldn't use the same db, or something.

Cheers,
   Doug.



2008/12/19 doug livesey <[email protected]>

> Cheers for those -- I can see I've got some learnin' to do!   Doug.
>
> 2008/12/19 Jamie van Dyke <[email protected]>
>
>
>> Now I'm by a computer...I specifically meant the HMAC session info
>> that tender uses:
>> http://help.tenderapp.com/faqs/setup-installation/login-from-cookies
>>
>> Hope that helps.
>> -- Jamie
>>
>> On 19 Dec 2008, at 11:13, doug livesey wrote:
>>
>> > Hi -- has anyone any experience of running 2 or more authenticated
>> > RoR apps under 1 login, so that the end user sees only one
>> > application as they navigate around?
>> > I guess this would involve sharing sessions between the apps, and
>> > I'm pretty sure it can be done (don't people do it with Rails &
>> > Merb?).
>> > Anyway, what I'd like to be able to do is have a few apps (I'm
>> > breaking up one monolithic app) that are all accessed by a user who
>> > has logged in once & doesn't want to be bothered again. It would be
>> > ideal if these apps didn't have to be hosted on the same machine.
>> > Oh, and this is a company's internal systems, with established
>> > logins, so an RoR solution would be best, rather than OpenID, or
>> > something.
>> > Does anyone in the hivemind have any experience with this?
>> > Cheers,
>> >    Doug.
>> >
>> > >
>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to