Kyle
2008-Jun-03 17:19 UTC
2.1 ActionController::Filters::Filter:Class conflicting with my own Filter class
I''m having issues upgrading from Rails 2.0.2 to 2.1.0. The ActionController::Filters::Filter:Class has changed just enough to cause me problems. I have my own Filter class. I know, I know - I didn''t know any better at the time. I''ll rename it if I absolutely have to. Now, when I make the following call, I get the following error: -------------------- @filter_list[c] = Filter.find_all_by_filter_type_id(c, :order => "display_order") ... NoMethodError (undefined method `find_all_by_filter_type_id'' for ActionController::Filters::Filter:Class): -------------------- Before clogging the list with more error output, I''m wondering if there''s a way to explicitly refer to *my* Filter class instead of the ActionController::Filters::Filter class. Is there? Otherwise, I''ll have to rename all of my calls to Filter.xxx, my database table, my views, etc. Any ideas? Thanks! -Kyle --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jean-François Trân
2008-Jun-03 18:09 UTC
Re: 2.1 ActionController::Filters::Filter:Class conflicting with my own Filter class
2008/6/3 Kyle :> > I''m having issues upgrading from Rails 2.0.2 to 2.1.0. The > ActionController::Filters::Filter:Class has changed just enough to > cause me problems. > > I have my own Filter class. I know, I know - I didn''t know any better > at the time. I''ll rename it if I absolutely have to. Now, when I > make the following call, I get the following error: > > -------------------- > @filter_list[c] = Filter.find_all_by_filter_type_id(c, :order => > "display_order") > ... > NoMethodError (undefined method `find_all_by_filter_type_id'' for > ActionController::Filters::Filter:Class): > -------------------- > > Before clogging the list with more error output, I''m wondering if > there''s a way to explicitly refer to *my* Filter class instead of the > ActionController::Filters::Filter class.Try : @filter_list[c] = ::Filter.find_all_by_filter_type_id(c, :order => "display_order") if it works. -- Jean-François. -- http://twitter.com/underflow_ --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Kyle
2008-Jun-03 19:01 UTC
Re: 2.1 ActionController::Filters::Filter:Class conflicting with my own Filter class
That did it. Thank you! -Kyle On Jun 3, 1:09 pm, "Jean-François Trân" <jft...-HujFcYLiWL6M4zKIHC2jIg@public.gmane.org> wrote:> 2008/6/3 Kyle : > > > > > > > I''m having issues upgrading from Rails 2.0.2 to 2.1.0. The > > ActionController::Filters::Filter:Class has changed just enough to > > cause me problems. > > > I have my own Filter class. I know, I know - I didn''t know any better > > at the time. I''ll rename it if I absolutely have to. Now, when I > > make the following call, I get the following error: > > > -------------------- > > @filter_list[c] = Filter.find_all_by_filter_type_id(c, :order => > > "display_order") > > ... > > NoMethodError (undefined method `find_all_by_filter_type_id'' for > > ActionController::Filters::Filter:Class): > > -------------------- > > > Before clogging the list with more error output, I''m wondering if > > there''s a way to explicitly refer to *my* Filter class instead of the > > ActionController::Filters::Filter class. > > Try : > > @filter_list[c] = ::Filter.find_all_by_filter_type_id(c, :order => > "display_order") > > if it works. > > -- Jean-François. > > --http://twitter.com/underflow_--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---