Sha256: 04ccf4b96af4a91b42521459c9bcff1cb46959159090b16f440e7340ca017bd8

Contents?: true

Size: 721 Bytes

Versions: 4

Compression:

Stored size: 721 Bytes

Contents

require "best_boy"
require "rails"
require "google_visualr"

module BestBoy
  class Engine < Rails::Engine

    initializer 'best_boy.model' do |app|
      if BestBoy.orm == :active_record
        require "best_boy/models/active_record/best_boy_event.rb"
        require "best_boy/models/active_record/best_boy/eventable.rb"
        ActiveRecord::Base.send(:include, BestBoy::Eventable)
      else
        raise "Sorry, best_boy actually only supports ActiveRecord ORM."
      end
    end

    initializer 'best_boy.controller' do
      require "best_boy/controllers/best_boy_controller.rb"
      ActiveSupport.on_load(:action_controller) do
        include BestBoyController::InstanceMethods
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
best_boy-0.3.0 lib/best_boy/engine.rb
best_boy-0.2.2 lib/best_boy/engine.rb
best_boy-0.2.1 lib/best_boy/engine.rb
best_boy-0.2.0 lib/best_boy/engine.rb