Matt Jones wrote:
> On Oct 18, 3:03�pm, Shahzad Bhatti <rails-mailing-l...@andreas-s.net>
> wrote:
>> I have recently upgraded my Rails app to 2.3. I am using STI where I
>> have class called BaseProfile that is extended by IndividualProfile. I
>> have some assocations that are defined in BaseProfile but I have been
>> getting errors when views reference those relationships, e.g.
>>
>> undefined method `primary_user?' for #<IndividualProfile:0x7fcb3ecea278>
>> RAILS_ROOT: /home2/plexobje/rails/linktank
> [snip]
>> The primary_user? is defined in parent class. This code used to work
>> with older version of Rails. Is there a fix for this?
>> Thanks.
> 
> You weren't kidding about the "older version" part, were you? :) That
> method was deprecated back in 0.9.5(!!) (January 2005) and went away
> several versions later. Even the deprecation warning is gone now.
> 
> The now-long-gone deprecation message recommended that you use ==
> instead; you'll need to check if you were passing the second argument
> (force_reload) or not.
> 
> --Matt Jones



As I said, primary_user? was defined in my class and I wasn't using 
deprecated method. However, it looks like Rails filters that method so I 
renamed it and it works now.
-- 
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 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to