similar to: drop down lists

Displaying 20 results from an estimated 10000 matches similar to: "drop down lists"

2006 Jul 16
2
HELP - Save drop down list using "collection_select"
Each post has a single category, which I''m filling a drop down list by using this: #view <p><label for="post_type_id">Category</label><br /> <%= collection_select(:id, :type_id, Type.find(:all), :id, :category) %> </p> In my Post model I have a field called "type_id" which is to be filled by the id in the Type table upon
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
2006 May 24
0
Problems validating form with collection_select
I have the following models: class Comandancia < ActiveRecord::Base has_many :elementos end class Elemento < ActiveRecord::Base belongs_to :comandancia validates_presence_of :nombre, :apellido_paterno, :apellido_materno, :comandancia end In the view for New Elemento I''m using <%= start_form_tag :action => ''create'' %> <%= render :partial =>
2006 Apr 06
1
drop down menu - getting @params[:id] value.
I am looking to get my option drop down list to populate from a model. In my controller i''m using: @roles = Role.find(:all, :order => "name") in my view I have: <%= collection_select(:id, :name, @roles, :id, :name) %> role <%= submit_tag("Go") %> I cannot get just the id of the selected option. If i inspect the params I get:
2011 Feb 17
1
(no) new join table entry by collection_select
Hi there ../view/trainings: in my _form.html.erb I use a collection_select to get the id of a worker from Worker-table. <%= collection_select(:worker, :id, @workers, :id, :first_name, options ={:prompt => "Select a worker"}, :class =>"worker") %></div> The collection select shows correct, but there will be no entry in the worker_id field of the new entry.
2006 Jan 25
2
select list generated from table
Have 2 tables - clients & case_managers class Client < ActiveRecord::Base has_one :case_manager end app/views/clients/_form.html contains line... <p><% collection_select("client", "case_manager_id", \ case_manager.find_all, "name", "id") %></p> and this line generates error... undefined local variable or method
2010 Sep 03
2
Problema con parámetros en collection_select (No novato)
Hola a tod@s, Les cuento... Tengo lo siguiente en aplicación: Una página donde esta mi modelo docencia que a su vez le voy agregando todos los dictados de carreras: <fieldset> <% f.fields_for :dictados do |dictado_form| %> <%= render :partial => ''dictado'', :locals => { :f => dictado_form } %> <% end %> <%= add_child_link
2006 Apr 24
4
creating a select box
Hi trying to create a select box in _form.rhtml. I have a table called organisations that contains fileds, 2 being ''id'' and ''name'' these are the fields I need to bring over to the clients _form.rhtml. whats the best way of going about that?? 2 ways i have seen suggested that I cant get to work -@organisations = Organisation.find_all placed this in def new
2005 Jun 13
3
validations not working with collection population droplists
I have an ADD form with foreign key field values selectable via select list ( collection_select (...)). When I add validates_presence_of :someotherfield to my model for error trapping, I get the following error for each droplist: NoMethodError in Reviews#create_curriculum Showing /reviews/_form.rhtml where line #16 raised: undefined method `inject'' for nil:NilClass Extracted source
2009 Sep 23
0
page rendering and drop down onchange event
hi, I want to display a subject drop down list and when i select some option from the drop down list i want to display all the questions under that selected category in the "SAME PAGE" and also get a form to add new questions in the same page. eg .. <%= collection_select(:question,:subject_id ,@subject, :id, :name) %> when i choose a subject i should, display all the
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
2008 Oct 16
4
Removing values from a select (drop-down) box
Hello, I am working on a project, and on one form we have a select (drop- down) box where the user needs to be able to select from a list of clients. The box is currently being populated with: <%= collection_select(:client, :id, @account.clients, :id, :name) %> The problem is that some of these clients may have already been selected, and we need to remove them from the list. Is this
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
2009 Jul 13
0
[PATCH server] remove vm forward vnc and vm host history
since the introduction of ovirt-vnc-proxy and the updating of ovirt-viewer to user it the forward vnc functionality is no longer necessary / and incompatable w/ the current system. --- src/app/controllers/vm_controller.rb | 2 - src/app/models/host.rb | 9 - src/app/models/vm.rb | 36 ----
2006 Jun 10
0
Dynamic file paths in FileColumn
I have a file uploader application in ROR using the very nice FileColumn plugin. In looking at the source code I can see that there is a DEFAULT_OPTION hash with some root path options and such which can be merged from an options paramater. These static path changes are not a problem. My question is dynamic path options. My upload form, when you boil it down, has two fields. The first is
2012 Mar 28
1
collection_select
_form.html.haml = f.label :Select_Brand, "Select_Brand<em>*</em>".html_safe = collection_select(:brand_name, :brand_id, Brand.all, :id, :name, :prompt => "Select a Brand" ) show.html.haml file %table %tr %td Brand_Name : %td = @message.brand_id After writing this code I am not able to see the brand name. Its not giving any error but
2006 Jan 26
0
selecting from dynamic pop-up list populated by a table
I''ll try again... I am looking at this page...HowToUseFormOptionHelpers http://wiki.rubyonrails.org/rails/pages/HowtoUseFormOptionHelpers perhaps I should be using Ajax for this...I haven''t looked at Ajax yet. Have 2 tables - clients & case_managers I want the data from a column in case_managers to be the select list on a screen for adding/editing clients as I am pretty
2011 Oct 10
2
Collection_select
Hi, I''m new using RoR and I have a ... trouble with f.collection.select What I have in a table is ... for example group code GroupA 07A GroupA 08A GroupA 10B GroupB 06A GroupB 11B GroupB 07B GroupC 10A GroupC 09A GroupC 09B when I use <%= f.collection_select :grupo, Equipo.find(:all), :id, :name, prompt: ''Choose a Group'' %>
2009 Sep 24
8
Drop down list ?
Hi Gurus, I''m trying to tackle a drop down list. I have category and item dbs, and they''re wired up with category has_many :items and item belongs_to :category, and an item has a category_id. I have this code in my new/edit.html.erb for item: <%= f.collection_select :category_id, Category.find_main, :id, :header, {}, :multiple => false %> And a pretty drop down list
2007 Aug 21
2
counter cache
Hi, I have two models, employees and departments, and i am using counter_cache to count the number of employees in a department. This works great, but employees can change their departments, and the counter cache does not get updated to reflect this. Is their a built in way to do this, or do i have to implement my own before_save hook thanks --~--~---------~--~----~------------~-------~--~----~