Look inside
Published about 7 years ago

“Don’t use the plugin you cannot write yourself. "

They are to save your time. Oh well, of course everyone is allowed an exception or two.

And I hate it when plugins do something like :

module Something::ActiveRecord
  module Base
    def self.included(base)
      base.class_eval do
        base.extend(ClassMethods)
      end
    end

    module ClassMethods
      def references_table_name(column_name, options)
        stuff
      end
    end
  end
end
ActiveRecord::Base.send(:include, Something::ActiveRecord::Base)

Instead of :

module Something::ActiveRecord::Base
  def references_table_name(column_name, options)
    stuff
  end
end
ActiveRecord::Base.send(:extend, Something::ActiveRecord::Base)

Makes me not wanna use it.