Re: [Radiant] Rails app to Radiant extension: problem - app already has User model

2010-01-11 Thread Asfand Yar Qazi
I will probably have to do something similar to that.  On the other
hand, I might just namespace all my classes that conflict.  But looks
like renaming is the way to go.  Now just to break the news to the
client...

2010/1/11 Arthur Gunn :
> Project-wide find and replace?
>     User —> Person
>     users —> people etc.
>
> Just do it case-sensitively.
> This worked fine for me.
>
>
> -Arthur
>
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Rails app to Radiant extension: problem - app already has User model

2010-01-10 Thread Arthur Gunn
Project-wide find and replace?
 User —> Person
 users —> people etc.

Just do it case-sensitively.
This worked fine for me.


-Arthur
  
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Rails app to Radiant extension: problem - app already has User model

2010-01-10 Thread Asfand Yar Qazi
2010/1/10 Arthur Gunn :
> Renaming your app's user model would seem like a very clean and easy
> way of doing things.
>
> I don't see any way of doing things without renaming your app's user
> model. The only alternative would be to drop it and patch radiant's
> user model with your changes. That's likely to be more trouble than
> it's worth, and the only potential advantage it brings you is that
> radiant editors can automatically become app editors and vice versa.
>
> Just call your apps user model Person.

And then go and rename it in every single location, from models to
controllers, specs and selenium tests.. I was hoping for another way,
as that is going to take a long, long time, and be potentially very
fiddly and error-prone.

Shouldn't Radiant be using its own namespace for everything?  I
suppose I could say the same thing about my app, why didn't I use my
own namespace?

I think I will just host the two apps separately, and use
ActiveResource or something to make them communicate when I have to,
and get my app to 'download' the layout from Radiant or vice versa.
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Rails app to Radiant extension: problem - app already has User model

2010-01-10 Thread Arthur Gunn
Renaming your app's user model would seem like a very clean and easy  
way of doing things.

I don't see any way of doing things without renaming your app's user  
model. The only alternative would be to drop it and patch radiant's  
user model with your changes. That's likely to be more trouble than  
it's worth, and the only potential advantage it brings you is that  
radiant editors can automatically become app editors and vice versa.

Just call your apps user model Person.


-Arthur

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Rails app to Radiant extension: problem - app already has User model

2010-01-10 Thread Asfand Yar Qazi
Hi,

I want to move my Rails app to a radiant extension, as it makes it so
much simpler to share layouts and things with my existing controllers.

However, there is a problem: the Rails app already has an Authlogic
based User model.  It would conflict with Radiant's one.

Can anyone tell me a solution to how I can make the 2 co-exist easily
without going in and rewriting either the app or Radiant to change one
of the User model's names?

If it isn't possible, I'm just going to have to make them separate
apps, and integrate them some other way.

Thanks
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant