I have added a method to the ActiveRecords module and put it in the lib
directory like so:

module ActiveRecord

  class Base
    def self.my_search(search, current_page, search_field, user_role,
perms)
      ...
    end
  end
end

This method has worked flawlessly in Rails 2.3.x and still works fine.
But Rails 3 refuses to find it.  This is in-spite of executing the
following statement in config/application.rb file of Rails 3:

    # Custom directories with classes and modules you want to be
autoloadable.
    config.autoload_paths += %W(#{Rails.root}/lib)

What am I doing wrong?

Thanks.

Bharat
-- 
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 [email protected].
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.

Reply via email to