Genshin/spree_warehouse — Issue #3: undefined method `all' for Warehouse:Module
Author: doktorj
Created: 2012-01-22 06:58:28+00:00
State: open

Hey Vassil,

when I clone this repo, and then manually copy over the db migration into my main app/run migrations, my server loads and I can get into the admin and then i can click warehouses but get this error:

NoMethodError in Spree::Admin::WarehousesController#index
undefined method `all' for Warehouse:Module

Also when i go into the rails console and manually do a Warehouse.all or Warehouse.new(:name => 'feh123') it gets similar errors.

I thought the problem might be related to the new Spree 1.0 namespacing convention, (if you look in spree_core you'll see they have all their models wrapped in a:

module Spree
end

but i'm unclear if having this in spree extension models is necessary, or not (no real docs yet). I tried adding it but the module wrapper but it didn't help.

Does it currently do this for you too?

Thanks,
J
Is this error happening for you too