similar to: Dynamic Finders with _or_create Don''t Work?

Displaying 20 results from an estimated 100 matches similar to: "Dynamic Finders with _or_create Don''t Work?"

2006 Jan 11
0
Easy Question, I Think
I am just getting started with Rails, don''t know any Ruby, and don''t quite even get object oriented programming yet. I have tweaked my schema to The Rails Way and have generated a bit of scaffolding. I am trying to create a new Part, which references a PartName and a PartNumber. I can create a PartNumber on the fly, but the PartName has to exist. I have an inelegant solution
2006 Jan 12
0
Easy Question, I Think [re-post, sorry if dupe]
I am just getting started with Rails, don''t know any Ruby, and don''t quite even get object oriented programming yet. I have tweaked my schema to The Rails Way and have generated a bit of scaffolding. I am trying to create a new Part, which references a PartName and a PartNumber. I can create a PartNumber on the fly, but the PartName has to exist. I have an inelegant solution
2008 Dec 13
2
What is "The Rails Way" to do this?
I have a PHP application with the following in one of the "views": <input type="button" onClick="newAlt()" value=" + "></nobr> The JavaScript for "newAlt()" is: // using DOM create new input box for alternate part function newAlt() { var html = "<input style=''background-color:#FFFFCC'' "; html +=
2006 Dec 01
1
group by
Dear R-community, I started using R to control yield and output from different factories by production week. A typical example is below. Location Week ShippedWafer SortedWafer UnsortedWafer WaferYield GoodDie A 47 9 4 5 0.476 -12 B 40 5 5 0 -0.3262 -9 B 48 2 1
2006 Jan 12
1
Form Entity Names for Child Objects
In my controller, I do this to instantiate and populate my Part, PartName and PartNumber objects. def edit @part = Part.find(params[:id], :include => [:part_name, :part_number]) end But in the view, this doesn''t refer to the right object. I somehow need to indicate that the part_name object is a child of the part object. <%= text_field_with_auto_complete :part_name,
2006 Jan 12
10
uninitialized constant error
Hi Everyone, I''m a newbie to Rails, and I just finished going through the cookbook tutorial. I''m now trying to build my own application, and I''m trying to add more inputs to the edit view to modify data in other tables. Below is the controller code where I am having trouble. PartsLocation is another table (like Part) in the database, and that is the line where
2004 Dec 23
2
Incoming calls from Sipgate go through the wrong peer
Hi, I have a few accounts with sipgate.co.uk to get some different DiD numbers. However, when an incoming call comes in, it seems to pick the wrong peer from sip.conf which sends the call into the wrong context and it fails because there is no extension in that context to match the register. Using the config's below, if I dial the DiD on account 2222222, it works fine - picks peer 2222222
2006 Apr 23
0
Complex Database Associations
Hi All, I''m running into some issues with a fairly complex database structure. I have 4 tables: Products - id - name Productsitems - id - product_id - name Units - id - product_id - serialnumber Unitparts - id - productsitem_id - unit_id - partnumber - serialnumber What I''m attempting to do is to create a page where, after selecting which product I''m entering, I
2006 Jul 20
4
Help with Rails and postgres with sequence numbers (global?)
Hello, I am building an Rails applications that has to integrate an legacy system (lxoffice) (schema at: http://www.lx-office.org/uploads/media/DB_Schema_2.1.1_R_393_17_03_2005_.pdf). They somehow use global ids (global for some tables). I can not change the schema and still I want to use Rails to access it and not pure SQL. When I try to insert a record I get the following message:
2010 Nov 30
4
CF disks images and centos
Hi all, I have 8G -CF cards that I have been putting linux on. Everything was working fine till yesterday when I got a new batch of CF cards. The size has changed. The original CF card was 7637M (255 heads/63 sectors/928 cylinders) The new CF card is 8019M (255 heads/63 sectors/974 cylinders) I would have thought putting the smaller image file onto the larger CF card would be ok. However its
2004 Aug 06
2
Introduction...
I've been following this kist for a while now and I suppose I had better introduce myself. This is going to be rather a long message, but that can't be avoided. My name is Andrew Baker and I work for a company called TeleDesign. We are based in the UK. http//www.teledesign.co.uk I have lots of experience with telecomms, a fair bit with VoIP, quite a bit (but rather less recent) with
2006 Jul 28
0
i need help migrating an old table
i have this big table that has columns: partnumber, 1piece-price-break, 10K-piece-price-break, 25k, etc... i want to split this into two tables: part_number, id and price_break, price, product_id so that, you know, the price-break columns are not stuck at fixed values; different parts can have differnt numbers of price-breaks, etc is there a ruby way to do this? i have navicat, but i
2005 Dec 14
4
find_by_ issue
In the Agile RoR book, page 219 (softcover version) they talk about the fact you can use the methods: find_by_ and find_all_by_ and fill in the last piece with a valid column name. So I have a database table called "parts" and the following columns: id partname partnumber vendor I do the following: (connection to DB already established) class Part < ActiveRecord::Base end
2004 Aug 06
0
Introduction...
1. Good Luck 2. Keep posting, we are interested in a fixed point version of speex and would try to colaborate. Our need isn't as immediate but if you set this up correctly we and (hopefully) others will try to collaborate. 3. I'm interested in the methodology for creating a fixed point implementation and guaging how "good" it is relative to the floating point golden standard
2004 Jan 19
2
Filename for printing?
Hi, all. I'm trying to create a PDF queue... or, rather, I already have a homebrew solution I hacked together with an lprng filter, and it doesn't work too well. The solution at www.linuxgazette.com/issue72/bright.html, which uses the smb.conf and "print command" paramaters, appears to be much more elegant, but has one major shortfall: I don't see any way to get the
2003 Jun 23
1
Setting up the E100P
Hello, I have an E100P, and in the zaptel.conf I have: span=1,1,0,ccs,hdb4,crc4,yellow fxsks=1-10 the light on the card is green( BTW what do all those states of the card that zttool reports YELLO, RED, BLUE ..., is there a doc for zttool?, or for the card?) in the asterisks` zapata.conf I have: [channels] context=default switchtype=euroisdn signalling=fxs_ks usecallerid=yes hidecallerid=no
2010 Feb 05
0
Sipgate.co.uk on Asterisk 1.6.2.2
Hi all, I have been running Asterisk for years (CVS-HEAD on 2005-08-24) with no problems save a failed harddrive. I have decided to build a new box and have Asterisk 1.6.2.2 playing nicely with mISDN after lots of changes to dialplan syntax etc. I am struggling with SIP trunks to sipgate.co.uk and dualtalk.com. Does anyone have a working examples? When I make an outgoing call I get... [Feb 5
2010 Jan 26
1
splitting a factor column into binary columns for each factor
Yesterday I posted the following question (my apologies for not putting a subject line): =================question====================== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11111111',100000),rep('22222222',200000),rep('33333333'
2008 Jul 10
0
ace error because of missings?
Hello RUser! I try to use ace for an ancestral state reconstruction but got back an error message. ace(FacVar,Tree, type="discrete") Warning messages: 1: In nlm(function(p) dev(p), p = rep(ip, length.out = np), hessian = TRUE) : NA/Inf durch gr??te positive Zahl ersetzt (NA/Inf replaced by positive number) 2: In nlm(function(p) dev(p), p = rep(ip, length.out = np), hessian
2007 Apr 03
1
realtime problem
Dear the following is the asterisk's dbase(Mysql5). if the extension =17171000 asterisk run appdata=222222, but I prefer to run appdata=3333333. let me know how I can run the appdata=33333 best Mani mysql> select * from ext; +----+---------+--------+----------+------+---------------------------------------+ | id | context | exten | priority | app | appdata