similar to: an instance of one model in another model''s definition?

Displaying 20 results from an estimated 3000 matches similar to: "an instance of one model in another model''s definition?"

2005 Nov 29
6
draggable revert problem
Hello, I have tried implementing the shopping cart ajax example and have run into some problems. The only differences with the shopping cart is My list of products are generated from a partial view The images of the products come from an http link. However, Iam seeing a strange behavior when I drag and drop the elements to my cart. On the first drag and drop the image successfully reverts to
2008 May 01
3
Adding script line give errors Help!
I am trying to add this script <script language="javascript" type="text/javascript" src="http:// www.expedia.com/pubspec/scripts/storefront/expe.sf.vertical.350.asp?pid=&aid="></script> To my idex page and it give me errors, when I delete this line <script src="js/lightbox/prototype.js" type="text/javascript"></script>
2009 Jul 29
3
Wine can no longer access port 80
I play a lot of games on Linux so I compile Wine from source and run it from the source directory to allow multiple versions and configurations. A couple weeks ago I started noticing errors whenever Steam tried to display a web page which was no biggie since I never use the storefront and I just chalked it up to Steam being buggy. But then I noticed the same error popping up in other programs
2005 Nov 03
2
[OT] CamCommerce
I was really excited today when a colleague gave me a lead on what I had hoped might become my first production Rails site. Almost as quickly, my joy began to fade upon speaking to the client. He wants a storefront that integrates with his existing POS database...a product called CamCommerce. A bit of research on this software (I''d not heard of it) suggests that the database backend that
2006 Apr 24
0
Web Services/Invoke Inconsistencies
Hey all, Got a bit of a long one here, so bear with me while I try to hash out the details... better to give too much than not enough. So we''re using the ActionWebService in order to communicate with a 3rd-party software client. We''ve created the API as discussed in Agile Web Development, and, in fact, invoke actually works perfectly. We have three example XML posts... they
2006 Jan 20
5
Instance variable?
I''m trying to grab a temporary variable from my view and then pass along that value to my model My view code is this: <td width="40" align="center"><%= text_field ''product'', ''qty_added'', {:size=>3} And I''m trying to pass the qty_added variable to my model. item.quantity = qty_added It doesn''t seem
2006 Apr 05
3
RoR user group in NYC?
Hi all, On the Rails wiki there are a few user groups listed, including one in Long Island, but none in New York City proper. Are there any user groups in NYC not listed to which people belong (including relevant non-RoR-specific ones)? Would love to share some ideas... thanks, - michael. -- Posted via http://www.ruby-forum.com/.
2004 Aug 27
5
IAXy Power in Australia?
Does anyone know a place in Australia that sells a power supply suitable for the IAXy? I haven't had any luck tracking one down. -- jeremy bogan [ jeremy@segpub.com.au ] segment publishing - design.develop.host
2006 Apr 12
1
pluralization issue? (taxes/taxis)
Hi all, Here''s an odd one. I have a "Tax" model which is related via a habtm relationship to a "Storefront" model. In my view_store rhtml file, I have the line : @storefront.taxes.each do |tax| This line returns the following error: NameError in Admin#view_store Showing app/views/admin/view_store.rhtml where line #52 raised: uninitialized constant Taxis See
2006 Jul 04
0
Help with first AJAX action
I''ve used Rails for a while, but haven''t really done any AJAX until now. Now I''ve been fighting for days with my first AJAX action and after reliably crashing Safari and throwing errors in IE, I''m finally coming to the list for help. :) I have a "controls" div in my layout. This div displays a list of page-specific actions. When some of these
2006 Feb 19
16
Open source rails e-commerce engine?
I''m pinging the list to see if anyone is working on an open-source e-commerce engine based on Rails yet - something like OSCommerice I guess. Anyone? Is there interest out there for such a thing? I have such a product which has been extracted from real world code. It currently runs 3 production rails sites in various shapes and forms, implemented as a rails engine. Basic feature list: -
2006 Oct 14
1
[ADV] Making space: First Edition AWDwR Paper Books: $12.50
When we announced the second edition of Agile Web Development with Rails back in May, we pretty much killed the sales of the first edition paper book. So now, with the second edition just a few months away, we need to clear out some space. So, if you''d like to pick up a first edition paper book, they''re going (while stocks last) for $12.50 (plus shipping) from
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
2007 May 30
2
Depot - empty_cart with ajax
First of all id like to say hi to everyone from Argentina, im yet another Depot first-timer. Going through the example, i got to the point where my cart finally runs Ajax-based. And there is a line where Dave says, after all the job is done "You should see the cart in the sidebar update. And you shouldn''t see your browser show any indication of reloading the page. You''ve
2007 Jan 05
4
How To Spec Controllers with Finders
Given this code (which renders rjs), I''m faced with the fixture- driven way of spec-ing or mocking. How the heck to you mock this so the code at line (2) and (4) work right? I''m still struggling with mocks but it seems like this can be done. Forgive the naivety of this question. 1. def change_quantity 2. @line_item = LineItem.find_by_id(params[:id]) 3. unless
2006 Feb 28
19
Session magic question
Greetings! I could really use some help understanding what Rails puts into the session store related to the objects it creates. I''ve found documentation on how _I_ can put / get info into it, but can''t find the docs on what _Rails_ puts into it. I''ve got a simple app that collects some data from the user, stores it in a db record, allows the user to edit it, display
2006 Jul 28
15
Store/product stock design question
Hi all, I''m having trouble figuring out how to handle stock levels in a new store I''m building. When products are entered into the admin of the store, they have a stock number associated with them. What I''m not sure about, is how I go about maintaining this stock level. Take this scenario: 1. User A adds an item to their cart, and I check that it''s in stock -
2009 Nov 01
5
Headache with sessions being shared.
I have a really horrendous problem with sessions. before_filter :find_cart_from_session private def find_cart_from_session if session[:cart] # if there''s is a cart in the session begin @cart = Cart.find(session[:cart]) # return existing or new cart rescue ActiveRecord::RecordNotFound @cart = Cart.create @cart.save session[:cart] = @cart.id
2006 Jul 31
4
RJS to find an element
I''m trying to implement a remove from cart method based on the examples in the second edition Agile book. I have everything working except for the RJS that removes items from the cart. Ideally what I''d like to do is highlight an element that I am deleting only if there is more than one of that particular item in the cart. If the item deleted is the only of
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].