Displaying 20 results from an estimated 38228 matches for "products".
2005 Jul 07
1
rsync 2.6.4 - directory always updated
Hi,
I'm trying to figure out why when I do an rsync (Solaris, version
2.6.4 on both sides) from a site on the West Coast of the US to a site
on the East coast, I keep getting directories updated when I use the
command like this:
# rsync -ar -v -v -i -O --force --delete --exclude=.snapshot --stats \
src:/sysic/lib/freedomlib_V100/ /sysic/lib/freedomlib_V100/
And I get output like this,
2007 May 08
4
help with rspec''ing controller
...dy'' 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)
Product.should_receive(:new).with(:params).and_return(@produ...
2007 Jun 11
2
Testing create in Rails controller
Hi All
So I am a first-time caller ;-) ... and have been trying to apply
RSpec to 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 =
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>"
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:
requ...
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\Product...
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?
..."))
end
end
if @product.errors.empty? and @product.save
flash[:notice] = "Product was successfully updated"
redirect_to :action => "show", :id => @product
else
render :action => ''edit''
end
end
Currently, products belong_to images, but later, I''ll probably have
products has_many images.
Say an image is invalid. So it won''t be saved. How do I properly
show that to the user? The above is my approach, where I have to
manually add image.errors.full_messages to the product.errors. But
then,...
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 answe...
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 th...
2006 Aug 04
6
Errors ... errors and errors.
...ed 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 not
understand why it gives me that error. Here is the store_controller.rb:
[CODE]
class StoreController < ApplicationController
def index
@products = Product.find_products_for_sale
#creates an instance variable that holds a list of all the
#products in order to make it available to the code in the view
#that will display the table
#find_products_for_sale() IS DEFINED IN product.rb
end
def add_to_cart
@cart = find_cart...
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
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
...t 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-forum.com/.
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 subs...
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.
What is wrong with the testcase? I can see it ruby console that
"product.valid?" returns false...so "assert !product.valid?&...
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
For example:
+-------------------------------------------+
|--> Sale 1 <--> Pop 1 <--> Product 1 |
| qty =...
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
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)