similar to: select helper question: limit-to-list

Displaying 20 results from an estimated 200000 matches similar to: "select helper question: limit-to-list"

2006 Apr 09
1
select helper question
Hi there, I try to develop a medical application using ruby on rails. There are many categories which can contain subcategories. I defined the model like this: class Category < ActiveRecord::Base has_and_belongs_to_many :notes belongs_to :parent_category, :class_name=>"Category", :foreign_key=>"category_id" has_many :sub_categories,
2005 Dec 22
0
Any way to add ''onchange'' to a ''select'' helper?
I basically have a select menu with two options: -- Leave password unchanged -- -- Enter new password below -- I want my form to use a sexy prototype effect to SlideDown the text field when the second option is selected. That way the user isn''t confused by a blank password field when they''ve selected to leave the password unchanged. Can I do this with Rails''s
2008 Oct 16
1
Modularisation: Using helper generating HTML output vs. using partials
Hey, I''ve got a general question: when do I use helper and when I do use partials to modularise certain gui elements? For example: I''ve got a faq list. Each item can be folded and unfolded using ajax. FAQ foo -> question 1 -> question 2 -> question 3 So, I wrote a helper "faq_li_tag(args)" which takes the question and answer for parameters and generates the
2006 Apr 06
2
Problem with select helpers
Hi guys, Im doing a todo list in wich every todo item belongs to a category so at the time of create i want a select dropdown to let me choose the category for the new todo item. I have two models, todo and category(wich contains a name field), all goes fine the problem is that i cant fill the select with the names in the category table, here are the code im using, i tried many ways to make
2006 Feb 25
1
checkbox helper question
I used scaffolding, then modified. As an after thought I added a "boolean" checkbox to my database, form with this tag <p> <%= check_box ''is_hot_item'', @photo.is_hot_item %> <label for="is_hot_item">hot item?</label><br> </p> I check it and save. But I don''t get 1 saved in my database field. :( I have just the
2009 Jul 02
1
Rails Select Helper
Dear All, I m using the below select helper for my select helper which works fine. <%=privilege. select :AC,Role.find(:all,:conditions => {:role_type => "AC"}).collect {|c| [ c.role_name, c.id ] },{},{:class => "txtbox"} %> Its generates the below html... <select name="privilege[AC]" id="privilege_AC" class="txtbox">
2008 Dec 23
1
Adding to select list
I have several select lists on a form generated via collection_select pulling values from the database. What I would like to do is, if new components need to be added to a select list (new options), I am providing a link beside the select list which will pop-up a small form to add a new item to the list. Upon saving the new item, I would like the list on the form (parent window) to refresh, so
2006 Jun 29
0
HABTM and select form helper
I am very confused about HABTM and a form select statement that I need to implement. I have two objects - Person which has the following fields: id, firstname, lastname, email Category which has the following fields: id, name A person HABTM categories and also the reverse. I have setup the join table using a migration. All that went well. Two questions - If I want to edit a person, how do I
2006 Apr 27
4
select item based on previous select list selection?
So I have a select list with a list of items. When a user selects an item, another select list should have its default selected item set to a specific item (the default associated with the first select list). This is in a form to create a new task. The first select list is a list of parent tasks. When one selects the parent task, the clients select list must default to the same client as its
2006 Mar 04
3
select helper method
Hey I''m having problems understanding the select helper. Here is my code: _____________________ DB table: genres id name descripition ___________________ In the controller: def index() @genres = Genre.find_all.map {|u|[u.name, u.id]} @id = params[''genre''] end ____________________ In the view: <% @genre = Genre.new @genre.id = @id %>
2007 Apr 26
0
select tag helper and option values with html entities prob.
Hi fellow Rails developers, I am using option tags with a select form helper. One option values is containing a special character quoted as html-entity ( &auml; ). When I provide the option tags to the select tag helper the ampersand gets quoted automatically. The result is &amp;auml; which doesn''t look as expected. Has anybody an idea how to avoid this quoting? Thanks, thorsten
2008 Jul 08
2
select helper still the worth thing in rails...
I have been trying all the day to make it happen, initial display is fine , but I cannot redisplay the selected value once the choice is done in my select helper I setup my slector in a helper (need to include the first option ''all'', as a prompt is displayed only once.... in my partial def company_role_selection(selection=nil) roles= [[''all'', 0]]
2012 Jun 27
2
Select Helper Array of Array + Filter
Noob alert! Hi, I am having trouble figuring out how to filter a select helper. The following shows all of the rows in the table but I would like to filter the collection from the list_name column (:list_name => "Project Status"): @project_status = Valuelist.all.collect {|s| [s.list_value,s.id]} Thanks in advance, James -- Posted via http://www.ruby-forum.com/. -- You received
2006 Mar 30
4
Select List to change type of STI class
Hi: I''m trying to create a drop-down list to change the type of a Single Table Inheritance class. I tried this: <%= select :user, :type, [ [''Author'', ''Author''], [''Editor'', ''Editor''], [''Administrator'', ''Administrator''] ]
2006 Jan 01
7
Can''t get select helper to populate dropdown w/default value
Guys, I searched this forum and found plenty of people having this problem, but I didn''t see any definitive solution. Usings Rails 1.0. When I edit an existing record, I can''t get the basic "select" helper to display the current value contained in the field of the record. All of my other (text) fields populate correctly with current field values. There appears
2008 Nov 26
0
looking for a plugin that does multi-list/select managment
Hi I''m looking for a plugin that will take the pain out of constantly re-implementing a UI ''functionality'' (for lack of a better term) that I''m using often. This functionality consists of two select (listboxes) - side by side. The one on the left has a list of items that the user can choose from and then by clicking on a button - move the selected
2008 Jul 14
1
Limit the data displayed in the index view with a select box
Hello, Please be prepared for some very basic, very newbie, very HTML-beginner, knows-nothing-about-AJAX questions... I have a (RESTful, if it makes any difference) application that displays a ton of data (names of documents) on the index page. I would like to limit the amount of data displayed, by adding a SELECT box that narrows the list of data down by selecting a category. Each category has
2006 Jul 31
0
RJS: Add item to select list (in order) and select
Using RJS templates, how would you add a newly created item to a select list, inserting it in its properly ordered place, and then cause it to be selected? Joe -- Posted via http://www.ruby-forum.com/.
2006 Feb 04
1
Error when using form helper and child objects
Hi, This is one problem that has gotten me stumped for quite a while. I have an Item that has_many :DeliveryMethod, and what I seek to achieve is to create a form that''d let me create an Item, as well as its DeliveryMethods in 1 single form. And so I tried something like: <%= text_field_tag ''Item[DeliveryMethod][price]'', @Item.DeliveryMethod ?
2008 Jul 01
1
select.list() cannot be used non-interactively
Hi. With the previous version of R, it was possible to execute the function 'select.list()' in BATCH mode. In this way, I could write my R code in a .R file and execute that with a double click on a .bat file, that contain the instruction tu run my R code in batch mode (R CMD BATCH myRcode.R). When I do that, a windows appear and I just have to select an item from the list. Now I've