Displaying 20 results from an estimated 20000 matches similar to: "Rails loop"
2006 Apr 19
6
Please help Me!
Hi to this Group!
I am new to Ruby!
I am facing problrm s to find the database functions.
I want the source of sites for predifiend functions for handling the
database.
I develpong the shoping cart application, In that i am facing problems
to delete the perticuller item form cart .
I got idea to delete the total cart information using sesiions
I want to delete the perticuller item form
2006 Jun 05
3
New to rails
Hi,
I''m 8+ hours reading and working through the book "Agile Web Development".
My brain is now mush :)
I have some php experience but that about the extent of my programming
experience.
Anyway, I do have a question - for those who know the book or those who
don''t -
The product table has a column for an image link ..i.e.
/images/something.gif
As part of the exercise
2006 Mar 01
6
Dtrace not working for processes running after a couple of hours
Hi, all,
I''m a newbie on dtrace and the problem I am having is:
For processes which have been running for more than a couple of
hours, dtrace doesn''t seem to be able to trace(I waited for at least one
hour and didn''t see anything happening). However, it works every time
for a relatively new process.
Any insight or help will be appreciated.
This is my machine:
2016 Sep 07
2
Receiving LLVM Error in Custom Backend
Hi,
I am receiving an LLVM Error from a custom 16-bit backend I am creating. I
am having trouble understanding the error/problem and how to go about
solving it. The error is:
LLVM ERROR: Cannot select: t29: i32,ch = load<LD2[%x.addr], anyext from
i16> t14, FrameIndex:i16<0>, undef:i16
t7: i16 = FrameIndex<0>
t9: i16 = undef
In function: mul_add
Can anyone provide any
2010 Jul 22
2
Dsync ignores INBOX when converting from mbox to maildir
Hi,
I am trying to convert email box in mbox format to maildir++. It
converts all folders except INBOX. For example:
dsync -D -v -f -u 'info at example.org' mirror 'maildir:~/Maildir'
prints:
dsync(info at example.org): Info: Sport: only in source
So it converts Sport folder, but INBOX folder is ignored.
dovecot.conf contains:
mail_location = mbox:~/mail:INBOX=/var/mail/%u
2017 Apr 11
3
Require help on removing SAMBA
Hi Team,
Can you please guide us to remove SAMBA 3.0.24 completely from our SOLARIS Server as we don't require it anymore ?
Thanks,
Suganthi
2001 Sep 18
1
Printer fiasco...
OK,
First, thanks for all of the help recently. I appreciate it.
But...I have just implemented the cvs code as to be able to use the 'use
client driver' option because win nt/2k machines have been seeing an 'Access
denied, unable to connect' error for the print queues and this will
apparently fix this. I will describe my setup and what I have done thus far:
RH 7.1
Samba 2_2 cvs
2008 May 17
12
validates_numericality_of with greater_than* less_than* simply don't work
It seems that the validations for:
greater_than
greater_than_or_equal_to
less_than
less_than_or_equal_to
equal_to
odd
even
Simply do not work (Rails 2.0.2). I''ve tried every combination I can
think of and these never seem to fire.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Jul 29
1
Xdefaults file.
I am trying to get my xterm window under gnome to open with large fonts,
with light green foreground and dark green background. I have the
following .Xdefaults file contents:
$ cat .Xdefaults
! This is a comment ;-)
#ifdef COLOR
*customization: -color
#endif
!! Let's cast a wide net, for any app supporting these
! Blink instead of beeping
*visualBell: True
*scrollTtyOutput: False
2006 May 31
8
New Rails site... RightCart.com
Hello Everyone !
Wanted to announce the launch of a new, 100%, Ruby/Rails based shopping
system.
http://www.rightcart.com (our blog: http://www.rightcartblog.com)
It''s basically a shopping widget that allows users to make purchases
directly through the widget.... no need to be redirected to a third party
shopping cart.
You can sell anything you want by upload the products onto the
2006 Jan 31
2
Design question: Storing user fields
Hello-
I have a database/rails design question. I''d like the user to be able
to specify a set of fields they would like associated with items.
Imagine a shopping cart where each item has a description and price.
But a particular customer may choose to associated a color with all her
items. (it will be site-wide, so every item listed for this particular
user will have this
2008 May 20
5
How to write a test for validates_uniqueness_of
Hi,
I have a spec
it "should have a unique username "
I have a code:
validates_uniqueness_of :user_name
Now, I don''t know how to test this code. In order to test this, do I
need to run `save`?
For example,
@user = User.create(:username => "mike")
@another = User.create(:username => "mike")
@another.save.should be_false
This messes up test
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
2012 Jan 19
1
converting a for loop into a foreach loop
Dear all,
Just wondering if someone could help me out converting my code from a for()
loop into a foreach() loop or using one of the apply() function. I have a
very large dataset and so I'm hoping to make use of a parallel backend to
speed up the processing time. I'm having trouble getting selecting three
variables in the dataset to use in the foreach() loops. My for() loop code
is:
2013 Feb 18
3
foreach loop, stata equivalent
Hi! I'm a recent convert from Stata, so forgive my ignorance.
In Stata, I can write foreach loops (example below)
foreach var of varlist p1-p14 {
foreach y of varlist p15-p269 {
reg `var' `y'
}
}
It's looping p1-p15, p1-p16...., p1-p269, p2-p15, p2-p16,... p2-p269,...
variable pairs.
How can I write something similar in R?
I 'tried' understanding the
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