Displaying 1 result from an estimated 1 matches for "has_fleet".
2012 Jan 23
0
Problem loading modules through ActiveSupport on_load
...d to package another set of methods with a
different purpose in the same application and I followed the same
approach:
**# lib/history.rb**
module Fleet
module Model
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def has_fleet(options = {})
send :include, InstanceMethods
end
end
module InstanceMethods
# methods ...
end
end
end
**# config/environment.rb**
ActiveSupport.on_load(:active_record) do
include History::Model
include Fleet::Model...