Issues with dynamic finders ruby-1.8.4 / rails-1.0.0


#1

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
example.

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.

Thanks!


Seth Thomas R.
http://sethrasmussen.com/