Im trying to extend a InstanceMethods of a gem (Globalize)
module Globalize
module ActiveRecord
module InstanceMethods
def foo
puts "Bar!"
end
end
end
end
However, this overwrites the existing instance methods of Globalize.
What is the correct way of giving a previously declared module additional instance methods?
Update: Trying to require them doesnt seem to work either:
module Globalize
require 'globalize'
module ActiveRecord
require 'globalize/active_record'
module InstanceMethods
require 'globalize/active_record/instance_methods'
def foo
puts "Bar!"
end
end
end
end
Update: By using answer provided by roxxypoxxy I can extend the instance methods by adding his answer to a initializer