similar to: Carrying model date from one page to the next

Displaying 20 results from an estimated 10000 matches similar to: "Carrying model date from one page to the next"

2006 Jul 20
19
Recipes versus Ruby for Rails: what''s best after Agile?
For expats from other languages, what''s the next best step after the Agile Web Dev book: Rails Recipes or Ruby for Rails? Thanks, -- Austin -- Posted via http://www.ruby-forum.com/.
2007 Oct 04
7
Using Predicates to look at an array..
Hi all, I have an array of shipping_type''s being returned, and I want to see what is in there. In the past I have done: shipping_type.include?(Cart::SHIPPING_TYPE_REGULAR).should be_true This works, but looks really ugly.. It just doesn''t roll of the tongue very well. I then looked up the use of Predicates, which I had been using, but hadn''t realized:
2006 Feb 02
6
How do I? Same Model, Different Controllers, Different Validations?
Hi all -- The simple question is: How do I set different validations for the same Model, when accessed in different Controllers? Here''s the scenario: I have a store/cart app, with a customer-facing shopping cart, and a typical Admin side. The Admin side also has an Order Entry component, where our staff can enter orders received by fax, telephone, etc. Both the customer-facing cart
2007 Oct 15
4
ArgumentError in StoreController#add_to_cart: wrong number of arguments (1 for 0)
I am really new to Ruby and Rails but as you probably see I am trying to get the shopping card working from the book. I am getting this error but I really don''t know what to do. I have looked up several of topics that stated the same problem but as far as I am, nothing has helped me out yet. Is there something wrong with the Product model? This is in the StoreController and I believe it
2006 Aug 16
2
Q on AJAX with respect to DRY
I have a shopping cart function, and I''d like to set it up to update the cart with AJAX. My AJAX call will return a view that displays the cart items. My question is with regards to keeping things DRY. When the user goes to "view cart", that page needs to display the cart, then the cart display needs to update with AJAX calls when items are added from that page. It would
2006 Apr 18
6
Best Practice for Returning to Calling Page?
I have a partial, it''s a shopping cart display, it''s designed to appear on several different pages of my site. One of the buttons on the shopping cart empties the cart, and then I want the calling page to redisplay. In other words, the cart controller needs to return the visitor to the same page -- however since the cart could appear on any given page, this has to be
2005 Nov 25
4
BlindDown recommendations?
Hi folks, I''m putting together a site that will have a shopping cart tab along the top which, when clicked, slides down to reveal the full contents of the cart (covering the page underneath it). When designing it and getting the styling right, I had the page display the cart fully open by default. This worked fine - the cart can close and open any number of times without problem[1].
2005 Dec 14
9
Passing quantity in a shopping cart
I am using this line on my index.rhtml page to capture the quantity required of a particular item for a basic shopping cart app: <%= text_field ''line_item'', ''quantity'', {:size=>3} %> </td> but my next screen (a cart screen) doesn''t reflect what was entered in that text field when the item is added to the cart. That is,
2006 Jan 20
1
[protoype] Problem with Effects on draggable element if revert is true
hi, I have a draggable element (cart-item) in a shopping cart <%= draggable_element "item_#{product}_#{i}", :revert => true %> When this element is dragged outside the cart into the "main_div", I want to show a puff effect and remove the element. When it is dragged within the cart, it should revert. So i wrote this code for drop_receiving _element <%=
2005 Mar 06
12
Where to place custom classes?
Hi all, I am writing a simple shopping cart which will consist of a single class. There will be no DB table for carts so I do not want to make my Cart a model. But where do I place my Cart class so that I can access it in my controllers? I want to be able do do things like this (for instance in a shop controller): def add_to_cart @session[''cart''].add(article_id, amount)
2005 Oct 05
3
Shopping Cart: SKU and Product Confusion
Hi there, I''m at a loss... I was on the #ROR channel last night and spoke to a really helpful person (Defiler) who gave me some direction on building a shopping cart. Unfortunately, I wasn''t able to successfully get to where I need to go. This is the predicament I am currently finding myself in: I''m building a shopping cart for a client''s new website. They
2006 Jun 16
8
OffRailed, and stuck in the book : (
Help, i''ve been trapped on the tracks here for a day now in the Agile w/ Rails book (latest edition) I can''t get page 115 to display. It says: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.each Extracted source (around line #3): 1: <h1> My Agile Cart</h1> 2:
2006 Jul 10
2
cross controller functional tests?
Hi, I have an online store and I would like to simulate a complete shopping trip which involves several controllers? How can I write a test that calls actions from different controllers in a particular sequence? Something like the following which involves department, product, cart_item, and cart controllers. get department 5 check it has a link to product 4 get product 4 post cartitem/create get
2007 Aug 17
1
Need volunteers for new Rails based shopping cart
We''re currently looking for volunteers on the new RailsCart[1] project. The idea is to build something relatively simple with all of the features that most open source shopping carts seem to be missing. We''ll be using ActiveMerchant for all of our payment gateway needs. We''re not trying to build the ultimate shopping cart. This is designed for Rails developers who need
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 Jan 20
3
Website running slow and Timing Out, but at random...
I have a site running the current version of Centos 4.2, it has a shopping cart running on it and runs slow and times out at random. The cart is a simple php package using a MySQL database backend. Can any one think of ways to improve the speed in MySQL and Apache, I've had the cart checked by the software vendor, it's working like it should, they are pointing to MySQL or Apache and
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error: undefined local variable or method `cart_item'' for #<#<Class:0x3715a78>:0x3715a48> Session info says the cart being updated properly. I''m just not able to output two variables: <%= cart_item.quantity %> &times; <%= h(cart_item.title) %> I did some research, and I can grasp that local
2006 Jun 20
3
Maintaining same session for a user across different PCs
Hi, I''m trying to make a simple shopping cart, where I want to maintain state when a use logs in from different location. Consider the following : 1. ''foo'' logs in from home pc and add ''bar'' item to the cart. 2. ''foo'' goes to office and logs in from office PC. 3. Now I want only one session for ''foo'', so that when
2006 Apr 27
2
''Agile Web Development'' book
I just started to learn RoR because I need to create a relatively simple but important application due next month. The Shopping cart app in this book is going ok but I have a question. Is the complexity of the shopping cart example in this book representitive of a real world application? Note that i am not saying if the application is production quality, I mean the
2006 May 25
2
Design question
Hi, I am really enjoying the experience of writing my first web app in Rails. I particularly like the instant feedback the framework offers when developing in small increments and I am learning new things all the time. However since I develop alone and my inexperience with rails I?m asking for help to answer some design questions that I have regarding my first app. After reading the Agile