similar to: has_many and order

Displaying 20 results from an estimated 700 matches similar to: "has_many and order"

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)
2006 Jan 24
17
Updated lighttpd to 1.4.9 - error running dispatch.fcgi
Hi all, I just updated lighttpd from 1.4.8 to 1.4.9 and it now refuses to start with the following error: 2006-01-24 23:12:24: (mod_fastcgi.c.989) execve failed for: public/ dispatch.fcgi No such file or directory 2006-01-24 23:12:24: (mod_fastcgi.c.1015) the fastcgi-backend public/ dispatch.fcgi failed to start: 2006-01-24 23:12:24: (mod_fastcgi.c.1019) child exited with status 2
2006 Feb 01
4
Custom view helpers
Hi all, I would like to write some custom helpers like the ones available as form helpers text_field, text_area and the like. My first try was this: custom_helper(obj, meth) ''some_string'' + obj.send(meth) + ''some_other_string'' end Object and method are being passed as symbols like this: custom_helper(:person, :name) and Ruby rightfully complains that
2006 Mar 08
2
Multilingual Validation Messages
Hi all, I have a mutilingual app and want to customize the validation error messasges. I cannot override them as I need them in more than one language, so I have done the following: validates_presence_of :some_attr, :message => _(''should not be blank'') I am using gettext to translate the message. This works in development mode, but not in production, even after a
2005 Dec 26
3
Override Validation?
Hi all, is there a way to override the validation methods so as to avoid the div.fieldWithErrors divs from being created on the redisplayed form? Many thanks in advance, Nicky
2006 May 08
2
Associating with different classes
Dear Railers, I am toying with a new project and have a schema design question. I have a tree-like node structure. Each of the nodes will be associated with a single object. This associated object can be of a variety of types. I represent the tree through a Node class which acts_as_tree. Now imagine three other classes--Animals, Fruits and Vegetables. Each node will have an association
2005 Dec 21
1
RE: Prototype: correct useage of onCompletewithAjax.PeriodicalUpdater
The only call that PeriodicalUpdater will make periodically to you is the insertion call. I think of onComplete as being ''I''ve done everything I was going to do'', which for Updater is right after it''s done a single update, but for PeriodicalUpdater, it''s after it''s finished all of its updates, so you''ll only get it once for any call
2005 Dec 21
1
RE: Prototype: correct useage of onComplete withAjax.PeriodicalUpdater
>From a quick look at the source code, it looks like onComplete is only called when the whole thing is done - in the case of Updater, right after the update, in the case of PeriodicalUpdater, right after it has been stopped. It looks like you need to pass your callback method as an ''insertion'' method in the options. This takes two parameters, the first will probably be the
2008 Aug 20
2
Positioning of axis titles
Hi, I have created a plot using filled.contour() and have the problem that one of the axis titles and an axis label are overlapping. I have tried changing par()$mgp (with, e.g. par(mgp=c(4,1,0)) ), but this just makes the title go off the screen. I can't work out how to make the plot take up less space in the window, so I can hopefully change mgp and sort the problem. Is changing mgp the only
2006 Jan 24
4
Can R handle medium and large size data sets?
Dear R experts, Is it true that R generally cannot handle medium sized data sets(a couple of hundreds of thousands observations) and threrefore large date set(couple of millions of observations)? I googled and I found lots of questions regarding this issue, but curiously there were no straightforward answers what can be done to make R capable of handling data. Is there sth inherent in the
2003 Apr 26
3
esfq experience anyone?
Hey, fellow LART controlllers, I''d like to ask if someome has a real esfq experience with HTB class hierarchy and esfq qdiscs. Lets say that I want to unite the connections to 10 client PCs with u32 or fw filters (doesn''t matter which one in fact) into one HTB class with esfq qdisc at the end. Did anyone tried it, and more important, did it worked the way it is supposed to? As
2006 Jan 02
1
Session and flash now working in IE6
Hi all, I noticed that my sessions and flashes are not working in IE6 (no problem with safari or firefox). I did a <%= debug session %> and indeed IE6 is showing session[:new_session] to be true all the time. This means a new session is created for every request. An old version of the same application is running on the same server under a different subdomain. In this sessions are
2008 Mar 27
1
Standard error values returned by lm()
Hi, This may be a stupid question, but how are the "std. error" values returned by lm() calculated? For example > summary(lm) Call: lm(formula = log10(moments[2, 1:10]) ~ log10(L_vals[1:10])) Residuals: Min 1Q Median 3Q Max -0.0052534 -0.0019473 0.0006785 0.0011740 0.0059541 Coefficients: Estimate Std. Error t value
2012 Jun 24
1
uncoerce.... to get real number instead of integer?
Dear R community, > #I'm using scan() to extract a real number from a file with a complex structure: 156689504.378. > #My problem is that the number is coerced into an integer.  > #Do you have any ideas for me on how to "uncoerce"?  Here is my code and the output: > #I'm using R version 2.15.0 (2012-03-30) > > net3 <- patient.net3 <-
2006 Jan 09
3
Selecting a subset of a table with DRY
Hello, I have table called ''listings.'' There are a certain combination of properties which make a listing viewable (e.g., it is confirmed, has been authorized, hasn''t expired, etc.). Each listing has one and only one category. I want to be able to do things like Listing.find_viewable(...) and Category.find(...).viewable_listings, but I see no way to do this
2010 Sep 14
9
Speech To Text on linux with asterisk
Hi, Is it possible to record say 30 seconds of audio and then have LumenVox convert to text ? or any available tool open source for speech to text . Regards Dhaval -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100914/b56c3d9c/attachment.htm
2002 Sep 17
8
the range of HTB''s prio
HTB and imq was used to control traffic. AC="tc class add dev eth0 parent" $AC 1: classid 1:1 htb rate 100kbps burst 2k $AC 1:2 classid 1:10 htb rate 50kbps ceil 100kbps burst 2k prio 1 $AC 1:2 classid 1:11 htb rate 50kbps ceil 100kbps burst 2k prio 1 please tell me the range of "prio" _________________________________________________________ Do You Yahoo!? 新鲜到底,娱乐到家 -
2006 Jan 10
3
ROR setup problems with Suse + apache
hello, I am tying to run ROR on apache 2 with suse linux 9.3, and I do not succeed with it. I set rubby und rails and all scripts are running fine. my Document root : /srv/rails/demo/public I did not setup FastCGI because I could not run it with normal CGI jet. my Virtual Server runs on 192.168.0.111 ServerName rails DocumentRoot /srv/rails/demo/public <Directory
2006 May 08
2
Queries with has_and_belongs_to_many relationship
I was able to create a has_and_belongs_to_many relationship for my app, but now I''m not too sure how to write queries for it. Basically, I have a table ''courses'' that has_and_belongs_to_many ''categories'' and vice versa So I''m trying to figure out how I would find only the courses that belong to a category that I specify. Let''s
2006 Dec 04
10
Avoiding SQL Injection in :order?
This thread references: http://www.ruby-forum.com/topic/90258#new http://www.ruby-forum.com/topic/82349#143790 ActiveRecord''s find() method has built in ways to avoid SQL injection by using the format > :conditions => [ "user_name = ?", user_name] Is there any such system for escaping injection in :order? It seems to only take a string and feed it to the SQL