Displaying 20 results from an estimated 3000 matches similar to: "''depot''app, trouble with session / cookies"
2006 Apr 16
9
''depot'' app, where''s session?
Many of you probably know the ''depot'' app from the ''Agile Rails 
development'' book.
I have constructed the ''products'' model, the Store-controller, and the 
''Cart'' and ''Line Item'' classes. I have told Application-controller about 
:cart and :line_item:
model  :cart
model  :line_item
Here''s part of
2006 Feb 26
0
NoMethodError in Agile Web Devleopment Depot Tutorial
I''m working on building the shopping cart in the Depot tutorial in the 
Agile Web Development book. I''m at the part (about page 80) where you 
build the ability to add items to the cart. I''m able to get to 
/store/display_cart/ and it seems items are being added, but if I just 
click on a link to add an item (/store/add_to_cart/2) it gives me this:
NoMethodError in
2006 Jun 23
3
Yet another problem with NoMethodError in Store#display_cart
Hi everybody,
I''ve search a lot on google to help me with this one without success. I
know that some people had the same problem as I have, but there
solutions doesn''t seems to work for me.
I''m trying to do the depot example in the AWDwR book. But now I''m stock
with a problem that I can''t solve. I get this error:
<--- begin error here --->
2006 Feb 12
0
no method error - you have a nil object....
hi,
i''ve been cracking my head on this one for a while and would be humbly 
grateful for any pointers
i''m working through Agile Web Devopment w Rails and, in the depot 
example have created the cart class for session handling, but am getting 
the following error, which suggests the @items variable is not being 
populated with any data from LineItem
NoMethodError (You have a
2006 Jan 30
2
Cannot see what I have done wrong.
In the Agile Rails tutorial I am revisiting building a cart. I have 
followed the steps given in the book to create the class ''Cart''
thus:
class Cart
  attr_reader :items
  attr_reader :total_price
  def add_product(product)
    @items << LineItem.for_product(product)
    @total_price += product.price
  end
  def initialize
    @items = []
    @total_price = 0.0
  end
2006 Apr 20
0
problem in "depot" app - cart contents not shown on checkout
Hi all -
I''m working my way through the "depot" tutorial.  I''m having a problem 
with the section where the cart contents are displayed on the order 
page.  The cart contents display fine after I add an item to the cart, 
but simply does not show up on the order page.
Any help would be appreciated.
I''m running Locomotive 1.0.0c on Tiger with MySQL from
2006 Aug 02
7
Same error ... again.
I reached page 82 of the Book "Agile Development with Rails" First 
Edition. After I compiled the code I got the following error message.
[CODE]
NoMethodError in Store#display_cart
Showing app/views/store/display_cart.rhtml where line #11 raised:
undefined method `product'' for 1099.0:Float
8: <table>
9: <%
10: for item in @items
11:   product = item.product
12:
2007 Feb 07
1
The Depot "Add to Cart" sessions question (2.ed agile book)
Hello,
Im in the process of working my way through the 2.ed of the agile book.
As many of you already know, the book goes through the regular
development cycle of the Depot application. I have hit a wall
when they started talking about the sessions and the exact mechanics of
how an item is added to the session.
The code looks like this:
depot/app/controllers/store_controller:
  def add_to_cart
2006 Aug 07
2
Newbie question about adding product to cart
Hello.  I''m using the Agile Web Dev. book 1st Edition and I''m puzzled by 
the code on pp. 83-84.
<%= link_to ''Add to Cart'', {:action => ''add_to_cart'', :id => product },
                    :class => ''addtocart'' %>
  def add_to_cart
    product = Product.find(params[:id])
    @cart = find_cart
   
2006 Jan 25
1
Agile arguement error
Working my way through chapter 8 of "Agile Web Development...", I''m
getting the following error when clicking the add_to_cart button.
 ArgumentError in Store#add_to_cart
    wrong number of arguments (0 for 1)
What am I doing wrong?  I know it''s got to be some thing stupid.
Request:
Parameters: {"id"=>"1"}
session dump:
---
:cart:
2007 Aug 30
3
Rails - depot application
I''m doing the depot example in the Agle Web development book. I''m
getting this error:
"undefined method `product'' for #<BigDecimal:331ce70,''0.21E1'',8(8)>  "
"Extracted source (around line #9):
8: for item in @items
9: 	product = item.product
10: -%>
11:   <tr>
12:   <td><%= item.product%></td>"
2006 Apr 11
2
Extending Depot Example
Hi
I am new to the whole Rails/Ruby world as having come from a MS .NET 
background, but I have followed the Depot example in the Agile Web Dev. 
with Rails book with relative ease. However as an exercise to see how 
much I had understood, I thought I would attempt to modify the example a 
bit and add a Quantity field to the store index so as to pass that value 
into the cart. I have extended the
2006 Jan 24
3
Unitialized constant
In Agile Web Development with Rails, I get this error when adding a  
product to my cart:
uninitialized constant Cart
...
Application Trace:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ 
active_support/dependencies.rb:200:in `const_missing''
./public/../config/../app/controllers/store_controller.rb:21:in  
`find_cart''
2006 May 05
1
Agile Rails (1st edition), depot TDD "exercise"
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I''ve been working my way through the Agile book and just completed  
the depot sample application. I learned quite a bit along the way.
On page 171 we are led through the creation of a test (that fails)  
for new code. The new code (a search function) is left as an exercise  
for the reader. Well, I think I solved it but I''m not
2006 Apr 18
4
''depot'' tutorial failing on adding to cart
Hi
I''m very keen to learn RoR and have been following the Agile Web  
Development with Rails book (first edition). However, I''ve come  
across a problem which has had me stumped for days now.
After following the instructions up to page 85 I have tried testing  
the code thus far, as suggested, by adding an item to the cart. But I  
am getting the following error:
--
2006 Jan 19
3
Troubleshooting Depot App
Hello!  I am working my way through the Agile Web Development guide on 
RoR (the depot application).
I am a bit lost as to where to debug the following error.  The error is 
pasted below:
================================================================================================
 NameError in Store#add_to_cart
undefined local variable or method `product'' for LineItem:Class
2008 Apr 15
2
NoMethodError in StoreController#add_to_cart
I''m trying to set up the Depot app from Agile Web Development and I
got this error after C1 - Creating a Cart.
The exact error looks like this:
-------------------------------------------------------------------
NoMethodError in StoreController#add_to_cart
You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while
2006 May 06
1
depot test-driven development exercise
(I posted this yesterday but within 20 minutes my thread was hijacked  
so I''m not sure anyone really saw this.)
I''ve been working my way through the Agile book and just completed  
the depot sample application. I learned quite a bit along the way.
On page 171 we are led through the creation of a test (that fails)  
for new code. The new code (a search function) is left as an
2005 Sep 02
4
Error has me stumped (Agile Web Dev with Rails book)
Hello everyone,
I''m a complete Rails newbie who is currently working my way through
the Agile Web Dev with Rails book. I''ve reached the chapter on
creating the shopping cart (chapter 8).
I keep having a problem with the same error which I can''t get past,
however what''s more confusing is that it''s being generated even when I
swap all my app code out
2005 Dec 25
2
[repost] newbie questions
Hi all,
I''m following the shop example in ''Agile Web Development with Rails''.
I would like to extend the checkout screen, in such a way people can change
the number of items they have selected in there cart.
In my controller I have:
  def checkout
      @cart = find_cart
      @items = @cart.items
      if @items.empty?