Hello guys, I am new to this Rails thing and am developing an application whereby the database schema changes slightly for two different kinds of clients. To accomodate this, I decided to use the Rails Product Generator. After putting forward the necessary changes I found two problems: 1. For any new controller or model to be added in the customised site, I need to add it in the base app as well. Is there a way to work around this? 2. The models with the new relationships mapped out do not work as I found it using the base app''s model validations. Can someone please help? Thanks in advance. Ravi Dhupar PS: I am using the latest version of Rails Product Generator _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Oct 16, 2005, at 6:17 PM, Ravi Dhupar wrote:> Hello guys, > > I am new to this Rails thing and am developing an application > whereby the database schema changes slightly for two different > kinds of clients. To accomodate this, I decided to use the Rails > Product Generator. After putting forward the necessary changes I > found two problems: > > 1. For any new controller or model to be added in the customised > site, I need to add it in the base app as well. Is there a way to > work around this? > >Hi Ravi, The current assumption (which I didn''t make consciously, but it appears you''ve discovered it) is that the base application covers most or all of the second-tier application functionality. As a result, rails_product requires the base application to have models and controllers as you''ve described. I may be able to have a look at this some time to see if it can be changed.> 2. The models with the new relationships mapped out do not work as > I found it using the base app''s model validations. > >I''m not quite sure I understand the problem here. Are you saying that validations don''t work at all?> Can someone please help? > > Thanks in advance. > Ravi Dhupar > > PS: I am using the latest version of Rails Product Generator > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson <duane.johnson@...> writes:> > > > On Oct 16, 2005, at 6:17 PM, Ravi Dhupar wrote: > > Hello guys, > I am new to this Rails thing and am developing an application whereby thedatabase schema changes slightly for two different kinds of clients. To accomodate this, I decided to use the Rails Product Generator. After putting forward the necessary changes I found two problems:> 1. For any new controller or model to be added in the customised site, I needto add it in the base app as well. Is there a way to work around this?> > Hi Ravi, > > The current assumption (which I didn''t make consciously, but it appears you''vediscovered it) is that the base application covers most or all of the second-tier application functionality. As a result, rails_product requires the base application to have models and controllers as you''ve described. I may be able to have a look at this some time to see if it can be changed.> 2. The models with the new relationships mapped out do not work as I found itusing the base app''s model validations.> > I''m not quite sure I understand the problem here. Are you saying thatvalidations don''t work at all?> Can someone please help? > Thanks in advance. Ravi Dhupar > PS: I am using the latest version of Rails Product Generator > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > _______________________________________________ > Rails mailing list > Rails@... > http://lists.rubyonrails.org/mailman/listinfo/rails >Hi Duanne, Thanks for looking into the problem. I found out that the validations do work but the base app''s validations do not get overwritten completely ie on inserting validations in the site specific version, the site then validated both the base app''s validations as well as the site specific validations. I have managed to fix that problem but still face the first one of being able to add controllers or models in the site-specific apps without adding them in the base app.