search for: store_controler

Displaying 20 results from an estimated 49 matches for "store_controler".

Did you mean: store_controller
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''
2009 Apr 06
11
How do I fix this? Power went down.
I was successful in reaching page 184 in the book "Agile Web Development with Rails" 3rd edition and while running the website with PostGreSQL as the backend, the power went down. The PostGreSQL database contents look OK and so do the source code files I was editing. But whenever I click on any "Add To Cart" button in the catalog, I get the following information in the
2006 Aug 17
10
Expected ... to define ...
Hi, I have edge frozen on vendor, and getting these errors logged: Expected ../config/../app/controllers/store_controller.rb to define StoreController ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:177:in `load_missing_constant'' ../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:275:in
2006 Mar 06
5
Rails MySQL query
Hi, I?m following the Depot tutorial in Agile Web Development with Rails. I need some help to display products thats in one specific category. mysql> select * from products where category = "jackets" does what I want, but I?m not sure how to make a list and display it in rails? This code displays every product with some of its fields, but I want it to only display the products
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 Dec 04
3
uninitialized constant Product
I am actually following the instructions/code snippets from "Agile Web Development with Rails" and got as far as page 73 where I did ruby script/generate controller Store index, then edited store_controller.rb to class StoreController < ApplicationController def index @products = Product.salable_items end end and product.rb to: def self.salable_items find(:all,
2006 Feb 28
3
Agile Web Development Example Application Question
I''m new to Ruby and to fairly new to programming. I''ve been working through the "Agile Web Development with Rails" book, and I''m stuck on page 73 of the print version. The book''s online errata directed me here with my questions. I''m running Ruby 1.8.3 with MySQL 4.1.8 on OSX 10.3.9. I''ve created the scaffolding for Admin controller
2006 Jan 11
6
Help -- NoMethodError in
Hi, I am just learing Rails and I am going through the Agile Web Development with Rails book. I am receiving: NoMethodError in Store#add_to_cart undefined method `add_product'' for #<StoreController:0x3764d80> RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/controllers/store_controller.rb:12:in `add_to_cart''
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 Aug 04
6
Errors ... errors and errors.
I bought the second edition of the ruby on rails, it seems to work fine now, did some adjustments to the code. But now I get a second error and I want to learn to understand to fix them myself. So here is the error. ArgumentError in StoreController#add_to_cart wrong number of arguments (1 for 0) #{RAILS_ROOT}/app/models/cart.rb:15:in `initialize'' #{RAILS_ROOT}/app/models/cart.rb:15:in
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
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 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 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
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 Jul 03
2
Agile Web Dev on Rails - ActiveRecord::RecordNotFound Prob
Hi there I''ve also made a start on the Agile Web Dev using Rails book! I''ve been hit with a problem when hitting the ''Add to Cart'' button - I get the following error message: ActiveRecord::RecordNotFound in StoreController#add_to_cart Couldn''t find Product without an ID RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full
2005 Dec 25
2
SOAP Client Connections
I''m trying to connect to a SOAP interface using Rails and I''m running into a snag. I''m relatively new to Rails at this point and am in the very beginning stages of understanding how the system works. Currently I''m running into a error that looks like this: -------------------------------------------- Missing API definition file in apis/amazon_api.rb
2005 Aug 04
7
Frames within rails
What is the best way to create frames in rails? thanks fp
2006 Jun 07
8
erb Regex ?
Hi Got a column named ''sku'' in a table named ''product'' <%= product.sku %> ...looks like this.... ''1234_56'' These last two chars (56) are an audio Track number. I ultimately want to display: Track <%= product.sku %> I can isolate the first part with /\d+\_/ = 1234_ But can''t figure out how to get the last two
2006 Aug 06
6
Having Problem w/ Agile Web Development book
I get this error ... NoMethodError in StoreController#index undefined method `salable_items'' for Product:Class and here is my store_controller.rb ... class StoreController < ApplicationController def index @products = Product.salable_items end def self.salable_items find(:all, :conditions => "date_available <= now()", :order => "date_available