search for: product

Displaying 20 results from an estimated 38216 matches for "product".

Did you mean: products
2005 Jul 07
1
rsync 2.6.4 - directory always updated
.../readme.txt .d...p... freedom_lib/TC280C/NH/ .f freedom_lib/TC280C/NH/TC280CNH.cellib.csv .f freedom_lib/TC280C/NH/TC280CNH.cellib.csv.org .f freedom_lib/TC280C/NH/TC280CNH.pglib.csv .f freedom_lib/TC280C/NH/readme.txt .d...p... freedom_lib/TC280C/product/ .f freedom_lib/TC280C/product/TC280_LH_PC_64X72W80IL_EI.product .f freedom_lib/TC280C/product/TC280_NH_PC_43X76W50IL_EI.product .f freedom_lib/TC280C/product/TC280_NH_PC_43X91W50IL_EI.product .f freedom_lib/TC280C/product/TC280_NH_PC_53X100W60IL_EI.produ...
2007 May 08
4
help with rspec''ing controller
...couple of approaches and still get errors: Mock ''remedy'' expected :save! with (any args) once, but received it 0 times -or- Mock ''Remedy'' received unexpected message :save with (no args). Here are my two sample approaches: describe "Create with a valid product and authenticated user" do controller_name :products before(:each) do @product= mock(Product) Product.stub!(:new).and_return(@product) end it "should tell the Product model to create a new product" do #mock_user_authentication(true)...
2007 Jun 11
2
Testing create in Rails controller
...the depot example in Dave Thomas'' book as I build the application. I am having a problem testing the admin controller create method and cannot quite see where I am going wrong so was hoping for a pointer :-) My spec looks like: describe AdminController do before(:each) do @product = mock("product") # Generally, prefer stub! over should_receive in setup. @product.stub!(:new_record?).and_return(false) Product.stub!(:new).and_return(@product) end it "should create a new, unsaved product on GET to new" do # Using should_receive he...
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>" this is display_cart.rhtml line_item.r...
2005 Dec 31
2
Test Unit Problem
Hello All, I am experiencing the following test unit error working with Rails that I can''t fathom. I have a products.yml file which holds the following test fixture for the products table: dell_pc: id: 1 title: Dell PC description: Dell PC image_url: http://.../pc_image.jpg price: 15000.00 date_available: 2005-12-31 06:53:00 I also have the following product_test.rb file to test the fixture above: req...
2005 May 23
1
Odd Disconnect problem, again. (Recv failure for 4?)
...t.c:audit_opendir(141) vfs_extd_audit: opendir . [2005/05/22 02:50:14, 1] smbd/service.c:close_cnum(837) server (192.168.123.20) closed connection to service netlogon And log from backup software: *** Starting Backup Backup Pre-Erase Compressed -- 5/22/2005 - 1:02:58 AM *** F:\Dir\DermaMed Products\Products 2004\Filename-#8-30-04.xls ** The network path was not found. F:\Dir\DermaMed Products\Products 2004\Filename-# 4-30-03.xls ** The network path was not found. F:\Dir\DermaMed Products\Products 2004\Filename-#4-30-03.xls ** The network path was not found. F:\Dir\DermaMed Products\Produc...
2006 Mar 17
1
How to update values in database in this form?
Hi, This is my rHtml page & Corresponding actions & model pages:- ===listform.rHtml================= <h1>Products List</h1> <%= start_form_tag(:action => "add_to_cart")%> <table> <tr> <% i=0 %> <th> Product No. </th> <th> Unit Price </th> <th> Available Qty. </th> <th> Demand Qty. </th> </tr> <% for product in...
2006 Feb 28
1
adding to errors in controller?
def update @product = Product.find(params[:id]) @product.attributes = params[:product] if params[:main_image] image = Image.new params[:main_image] if image.save @product.main_image.destroy if @product.main_image @product.main_image = image else @product.errors.add_to_...
2010 May 17
1
Query on linear mixed model
...lme formula correctly.. If the formula i have used is not the correct one i would appreciate receiving inputs on what is the correct formula for lme that I should use given the context of this example study shown in the data.. Just to give an introduction.. the data is about studying efficacy of 3 products for their impact in skin brightness over 3 time points of investigation .. The design is such that all the products are tried on patches made on each arm (left and right) for each volunteer and chromaL is measured as the response over 3 time points Baseline (referred as T0), T1 and T2.. The answ...
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 that has t...
2006 Aug 04
6
Errors ... errors and errors.
...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 `add_product'' #{RAILS_ROOT}/app/controllers/store_controller.rb:19:in `add_to_cart'' -e:4 Now, it says as far as I understand it, that it should need 0 arguments instead of 1. But that should be quite impossible, beacause the cart.rb has a def add_product(product) as we shall see later. I do...
2008 Sep 03
2
Highlighint rjs problem on a new product
Hi, Problem Summary: I have been trying to add the highlight effect to my table but everytime a new record is added the highlighting gives an rjs error. However when i click the add to cart button on a product that already exists inside the table, the highlight effect works. Is this because the partial must only have only one <tr></tr> in it and the <table> must be on the other page that is rendering that partial? View Code: --------------------------------------- <table> <% f...
2006 May 11
4
Legacy database problem
Hi I am trying to use Ruby on Rails to work with an existing database. The problem is that, all the table names begin with a captial letter (e.g. Products). So I did the following changes in environment.rb, I''ve added under # Include your application configuration below ActiveRecord::Base.pluralize_table_names = false In class Product, I''ve added set_table_name "Products" however, if I try to list all the elements in...
2006 Mar 04
7
Get ID after save
This is simple (I am sure) but how do you get the id of the inserted element after the element has been save? I thought it was something like this: @product = Product.new(params[:product] if @product.save add_image(product.id, params["image"]) flash[:notice] = ''Product was successfully created.'' redirect_to :action => ''list_products'' end But that isn''t it -- Posted via http://www.ruby-...
2009 Oct 29
2
The 'subset matching' challenge
Dear all, The following problem just has been submitted to me by an accountant. In his new job, he has to close some old accounts. He has yearly amounts, and a list of products that have been bought over the years, at certain prices for which he has an exhaustive record. The problem is: He does not know what product was bought this or that year (don't ask). He does not want to find back the real story, but just write realistic accounts, for which the sum of a sub...
2006 Jul 11
4
assert fails with <false> is not true
Hi, I have a simple model and written a testcase. class Product < ActiveRecord::Base validates_presense_of :name end ------------- class ProductTest < Test::Unit::TestCase fixtures :products def test_invalid product = Product.new assert !product.valid? end end ------------- The testcase fails with a message, <false> is not true. Wh...
2009 May 27
4
Sale, pop and product
Hi, I couldn''t find a better word for pop, but let''s go: There are 3 models: sale, pop and product sale: -total:integer pop: -quantity:integer -discount:float product: -name:string -price:float A sale can have many different products, each one has a quantity and discount associated. So each sale has_many :products through => pops And each product has_many :sales through => pops...
2006 Apr 25
6
SQL WHERE equivalent in rails
What is the equivalent of the WHERE SQL condition in rails? I''m thinkin this could be something like: <% for product in @products where category="1" %> but obviously the syntax is wrong. -- Posted via http://www.ruby-forum.com/.
2005 Nov 30
8
nested attributes with update_attributes()
Hi, I am trying to use the update_attributes on object with nested attributes and I am getting the following error: ProductPrice expected, got HashWithIndifferentAccess Here''s the situation (simplified): class Product < ActiveRecord::Base belongs_to :productPrice end class ProductPrice < ActiveRecord::Base has_one :product, :dependent => true validates_presence_of...
2012 Jun 06
3
problem about set operation and computation after split
hi, I met some problems in R, plz help me. 1. How to do a intersect operation among several groups in one list, without a loop statement? (I think It may be a list) create data: myData <- data.frame(product = c(1,2,3,1,2,3,1,2,2), year=c(2009,2009,2009,2010,2010,2010,2011,2011,2011),value=c(1104,608,606,1504,508,1312,900,1100,800)) mySplit<- split(myData,myData$year) mySplit $`2009` product year value 1 1 2009 1104 2 2 2009 608 3 3 2009 606 $`2010` product year v...