I figured it out. I actually made it simpler for me since I will be
using a lot of methods (duplicate) for 37 different models.
I just created a plugin..
script/generate plugin template_searches
init.rb added..
ActiveRecord::Base.send :include, TemplateSearches
template_searches.rb added..
module TemplateSearches
def self.included(base)
base.extend(ClassMethods)
end
module ClassMethods
My Methods...
end
end
Removed the duplicate code and restarted and all is working well.
--
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
-~----------~----~----~----~------~----~------~--~---