One of my classes called global_list is being overgrown and I'd like to break it out to a module called GlobalListAggregate. There are a set of find_by_sql methods that I'd like to use (yes, I'll refactor later) but need to move them out of global_list first.
I'd like something like (obviously are sql queries are much more complex than this):
module GlobalListAggregate < ActiveRecord::Base
def self.get_users
sql="select * from users"
users=find_by_sql([sql])
end
end
but a module can't be extended this way. How could I achieve this?
thx