After digging into this a bit more, the decorator was beginning to look
more like a rewrite of the existing controller. Not sure why my changes
were not embellishing the controller, but.. perhaps someone can shed some
light on that for me.

Instead, I have sent a pull request to the maintainer to just change the
controller to include Spree::StoreController. Makes more sense in the long
run.


On Thursday, February 7, 2013 10:01:54 PM UTC-7, Randy Terbush wrote:

I'm trying to create a cart link on a page that only includes
Spree::BaseController. If I try to access the page, I get the following
error:

undefined method `current_order' for #<Spree::InquiriesController:0x7bf90d0>


After some research, I've tried to create a decorator in apps/controllers/inquiries_controller_decorator.rb with the following contents:


module Spree class InquiriesController < Spree::StoreController
include Spree::Core::ControllerHelpers::Order
end
end


The page now raises the following error:


undefined method `model_name' for NilClass:Class

Not clear to me if I am digging myself deeper here or am on the path to figuring this out. Would appreciate a little guidance.


Thanks

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spree-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedFeb 8, '13 at 5:31a
activeFeb 8, '13 at 5:31a
posts1
users1
websitespreecommerce.com
irc#RubyOnRails

1 user in discussion

Randy Terbush: 1 post

People

Translate

site design / logo © 2022 Grokbase