similar to: Populate combo box from database without repeatness

Displaying 20 results from an estimated 800 matches similar to: "Populate combo box from database without repeatness"

2003 Mar 07
1
column name changes based on substrings
Hi peoples, I'm trying to work out a function which will allow me to relace column names on the basis of substrings within the existing names. e.g. I'd like: blah.Na blah2.Na blah3.Mg blah4.Mg blah5.K blah6.K R1 x x x x x x R2 x x x x x x ... to become: Na (%) Na (%) Mg (%) Mg
2009 Aug 29
3
what is the best way to delete so many queue files?
Hello, all. I found that so many unnessary queue files are saved at /var/spool/clientmqueue/ directory. I tested two way to delete these files. 1. # rm -rf /var/spool/clientmqueue/* 2. # cd /var/spool/clientmqueue/ ; find . | xargs rm -fv But this makes a few load of the system and took too much time to delete. What is the best way to delete fast without too much load?
2008 May 29
2
how to use substring match as condition?
Hi, How can I use a substring match as a condition in a subset command? Sth like this: subset(input, field1=="blah1" & field2=="blah2") # but now with substring match in field2 subset(input, field1=="blah1" & field3 *substringmatch* "blah3") I've tried with gsub, but it won't work: subset(input, field1=="blah1" &
2011 Sep 05
2
Unable to write mbr using syslinux.exe
Hi, ? I tried to use the syslinux.exe (version 4.04)?to make my usb drive bootable. When i run the syslinux.exe with the respective options I get this error ? "Accessing physical drive: The request is not supported. Did not successfully update the MBR; continuing..." ? I have administrator privilege and I started cmd prompt with "Run as Administrator" option too. I tried the
2011 Feb 17
4
PGError: ERROR: relation "instructions" does not exist
HI, I got this error when i am testing my rails application. I dont have the table named ''instructions''. But it shows a error like "ERROR: relation "instructions" does not exist". Totally, I got same error for 64 tests as 64 errors. I am using rails 3.0, Ruby 1.9.2, Netbeans 6.8. PS: I didnt creat Instruction manual for rails application. *Error:
2009 Dec 19
1
Nortel BCM - Call Accounting Interface?
Dear List, Need to know if anyone on this list has had any experience with using the Nortel BCM 50 for Call Account Reporting using an IP connection to a Linux / Asterisk interface? Presently, I have a BCM 50 installed that uses a local Lenova Small Form Factor PC with a windows XP / os that quit reporting because of a up-grade to the Nortel reporting software. Nortel support is now telling
2006 Apr 27
3
collection_select to display 2 fields
I''m trying to get a collection_select generated Drop-down box to display two fields from a table (first name & last name); however, I am having trouble concatenating the symbols. It appears as though any code I put in the 5th argument for collection_select is processed prior to executing the collection_select method. The code executes successfully with 1 symbol in the 5th
2005 Jan 25
4
Collection_select with multiple options
Hi, I have built a select field that allows multiple options selected with collection_select and "multiple"=>"multiple". How do I go about receiving the values? If I use a variable name like collection[], it complains that I can''t use @collection[] as the instance variable. TIA victor
2006 Mar 07
6
how to add onchange javascript event to select field
I would like to add javascript ''onChange'' event handling for a select field, such as <%= collection_select("job", "client_id" , @clients, "id", "name") %> with onChange="xxx" Anyone know how to make this work? Thank you, Scott -- Posted via http://www.ruby-forum.com/.
2009 Aug 11
5
Dynamic drop-downs in a form_for using AJAX remote_function - Help
Hello - I am fairly new to Ruby on Rails, but feel like I am learning quick. I have what seems to be a fairly unique issue as I cannot find much out there that describes what I''m seeing. Hopefully it''s a very simple fix, and I simply can''t see the forest through all the trees! I am attempting to create 2 related drop-down lists in the same form_for, both using
2012 Sep 13
3
Creating a link_to from a collection_select
I want to be able to change one attribute of a link_to to be what is the current selection of the collection_select. And needless to say I can''t quite figure it out. app/views/tasks/show.html.erb Who would you like to assign this task to?<br /> <%= link_to ''Myself'', :controller => ''task_queues'', :task_id => @task.id, :action =>
2007 Aug 03
2
Does collection_select work in list.rhtml?
Hi, I have 2 models: Model 1: er, Columns: <er_id, er_name> Model 2: er_process, Columns: <er_id, er_process_name> er_id is a foreign key for Model 2. When I am creating a new er_process or editing an existing one, I have been successful to use collection_select to show the available er''s so that the user can select a particular er by its name (to populate the er_id
2006 Nov 29
5
Collection_select with two columns and a prompt
Hello, I am quite a newbie to RoR, I hope you maybe able to help. I have a collection_select in a _form.rhtml: "collection_select(:assets, :model_id, @models, :id, :model_ref,options={:prompt => ''- Select a model -''})" As you see my drop down menu will show the model_ref column. 1) Is it possible to have more than one column. For example I would like to
2009 Jun 14
5
Partials views and instance variables go nil
Hi everyone! Model: http://pastie.org/511290 Controller: http://pastie.org/511285 View new: http://pastie.org/511286 View _form: http://pastie.org/511284 When I hit submit button there''s an error for usuarios(users in portuguese) instance. It does not seems to save usuarios even though it seems to be posted by the form. Error: http://pastie.org/511292 Need some help here guys plz --
2011 Aug 11
17
f.collection_select: what are the parameters?
The rails docs are so horrible on the collection_select method. They need to show a *complete* form, and show two examples: one that calls f.collection_select(), and another that calls collection_select(), and explain the differences. Given this line: f.collection_select :topic, Topic.all, :id, :category What the !@#$!@#$ is :topic? -- Posted via http://www.ruby-forum.com/. -- You received
2007 Apr 25
17
Multiple swap partitions
I have a machine with two swap partitions (sda2 and sda8). Both will have none as mount point. When I try to use puppet (using mount type) for managing fstab I get problems because "name" in both instances (i.e. mount path) will be "none". How should I fix this within puppet? Regards Halvard Moe
2006 Jun 22
2
Setting an index on a collection_select
I am creating a data entry form that allows a user to fill in multiple rows and save them all at once. In my controller, I create an array of "person" objects and pass it to the page. On the page, I have a text field like so: <%= text_field "person", "name", "index" => 1 %> Note the "index" attribute, which sets the name and id
2006 Jul 16
6
using collection_select
hello, supposing i have a User class that contains a Wibble class User < ActiveRecord::Base has_one :wibble end in my view i have <%= collection_select :user, :wibble, Wibble.find(:all), :id, :name %> when i post, i get an error like "Wibble expected, got String" how/where am I supposed to convert this posted wibble_id into a Wibble, or am I using collection_select
2006 Jul 20
2
using association properties in form helpers
sorry for the noob question: how do i reference an association''s properties in a form helper? e.g. if i wanted to build a select list to choose a user''s address''s state (user.address.state), how would i hook that to the "method" of collection_select collection_select :user, ???, States.find(:all)
2006 Feb 24
4
Problem having two belongs_to of the same class type
I have a Shipment class that is used to ship packages between Branches. However, when I try to have two belongs_to in Shipment called shipped_to and shipped_from I can''t seem to make it work. I can get it to display the form properly but when I select the branches and click save I get the following error... "Branch expected, got String" Any ideas? I have added some code