Forum: Ruby on Rails Issues with dynamic finders ruby-1.8.4 / rails-1.0.0

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Seth Thomas R. (Guest)
on 2006-01-11 19:08
(Received via mailing list)
Hi all,

I am not certain this is a 1.8.4 related issue, but I think it might be.

I'm trying to use dynamic finders for my Category and Post models,
such that a request /blog/categories/general would detect the slug and
do a find_by_slug() instead of find(params[:id]).

My have_slug?() method works fine, and the dynamic finders *were*
working fine until I moved it off my local machine running 1.8.2 (win)
onto a live server running 1.8.4 (redhat enterprise 3).

Now, vanilla finds work just fine, but the table names are not getting
properly resolved for the dynamic finder find_by_slug()...
ActiveRecord tries to query Categories instead of categories, for

To confuse things even more, if I go into console, I am able to do
find_by_slug() with no problems.

Any thoughts or recommendations would be greatly appreciated. I've
queried #rubyonrails a few times with no bites.


Seth Thomas R.
This topic is locked and can not be replied to.