On 10 Nov 2008, at 21:04, Jonathan Rochkind wrote:
> > Hmm, just changing the model name from Request to AppRequest doesn't > seem to have done it. > > I tried to leave the (many) associations pointing to AppRequest (nee > Request) the same, but specify a :class_name and :foreign_key. > > It sounds like maybe "request" as the name of an assocation, even when > not the name of the model, is a no-no too? I'm not convinced that has anything to do with this at all. If you could post your teeny tiny example I might be able to work out what is going in (given that I wrote the code behind include in 2.1.2) Fred > > > Man, that lengthy lengthy list of reserved words, which wasn't really > official documentation anyway and seems to be have been discovered > only > by experimentation... is leading to one of those times I'm less happy > with ruby/rails. > > I've got a lot of refactoring to do. Changing the many association > names > to this model every time they are used is not going to be fun. > > Jonathan > > Jonathan Rochkind wrote: >> Thanks a lot Chris. Sadly, I've got my work cut out for me, as >> changing >> the name of the model in this fairly mature application is going to >> be >> some work. But at least it all makes some sense now. >> >> Is it possible to change the model name without changing the name >> of the >> _associations_ that point to it in other models? Or, I guess, to >> alias >> the association name 'request' to an 'actual' association named >> service_request or whatever. To give me less code that has to be >> changed? Any advice as to the lowest impact way to change a model >> name >> in a mature application with lots of code that refers to that >> model, and >> to associations in other models that point to that model? >> >> Odd that I got away with it in Rails 1.x, but oh well, I guess it was >> really incorrect all along. >> >> Jonathan >> >> Chris Bartlett wrote: >>> Jonathan is probably right. 'Request' is a reserved word in Rails - >>> see http://wiki.rubyonrails.org/rails/pages/ReservedWords >>> >>> Try changing the model name to ServiceRequest or similar. >>> >>> On Nov 7, 6:43�am, Jonathan Rochkind <[EMAIL PROTECTED] > > -- > Posted via http://www.ruby-forum.com/. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---