Sha256: 9335ae71fe26a0d4b30ae0fa57cf5d517da47437dea6f8f8601619867fbeef40

Contents?: true

Size: 540 Bytes

Versions: 10

Compression:

Stored size: 540 Bytes

Contents

require "enju_inventory/engine"
require "enju_inventory/item"

module EnjuInventory
  def self.included(base)
    base.extend(ClassMethods)
  end

  module ClassMethods
    def enju_inventory
      include EnjuInventory::InstanceMethods
    end
  end

  module InstanceMethods
    def get_inventory_file
      @inventory_file = InventoryFile.find(params[:inventory_file_id]) if params[:inventory_file_id]
    end
  end
end

ActiveRecord::Base.send :include, EnjuInventory::InventoryItem
ActionController::Base.send(:include, EnjuInventory)

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
enju_inventory-0.1.12 lib/enju_inventory.rb
enju_inventory-0.1.11 lib/enju_inventory.rb
enju_inventory-0.1.11.pre13 lib/enju_inventory.rb
enju_inventory-0.1.11.pre12 lib/enju_inventory.rb
enju_inventory-0.1.11.pre11 lib/enju_inventory.rb
enju_inventory-0.1.11.pre10 lib/enju_inventory.rb
enju_inventory-0.1.11.pre9 lib/enju_inventory.rb
enju_inventory-0.1.11.pre8 lib/enju_inventory.rb
enju_inventory-0.1.11.pre7 lib/enju_inventory.rb
enju_inventory-0.1.11.pre6 lib/enju_inventory.rb