Displaying 20 results from an estimated 300 matches similar to: "HELP: multiple select list in ror"
2013 Oct 25
1
add a color band
Hi all,
I would like to ask your help to add a color band (Ι am not sure regarding the right term, this color band at the right of the plot "describing" values with their corresponding color.
For now I have only this code
test<-matrix(data=runif(10000),nrow=100)
plot(test,axes="FALSE")
axis(1,at=c(0,1),labels=c("a","b")) #
but I would like to add
2007 Jul 30
2
build a menu (li.selected)
Hello,
when I try to create a menu I found the following limitation:
the event li.selected does not work
and, I am not being able to show an image when the menu option is
selected
in my CSS exists the following code:
.menu li.selected {
...
background: transparent url(/images/menu_selected.gif) 100% 1px
no-repeat;
...
}
in file: ...\layouts\application.rhtml
exists the following code:
<div
2006 Jul 26
5
code for uploading files to the filesystem instead of db
Does anyone have any standard code for uploading files to the
filesystem?
I''ve got code already for uploading images to the database but I''d
prefer to store the files on the filesystem.
In particular I need to know how to
(a) ensure a file has been selected in the file_field
(b) how to extract the filename from the file_field
(c) how to actually move the file from client to
2005 Nov 06
4
which package has applet-widget.h
I am trying to compile gtik.c and it wants to include applet-widget.h
I have installed gnome-panel-devel and it cannot find it.
What package has appet-widget.h?
Thanks,
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20051106/c0609917/attachment.html>
2006 Apr 04
6
check_box_tag is limited?
Hello all.
Am I going totally nuts here and just want to check (Natch!) something.
A normal check_box has two value posssibilities. One for checked and one
for unchecked, the value gets submitted with a form.
The check_box_tag on the other hand, has a checked_value (Called just
''value'') and for the unchecked value...nothing, zip, nada.
This means that if you submit a form with
2007 Sep 15
3
check_box_tag always checked
#check_box and #check_box_tag are going to be the end of me. Why is
this always checked?
<% checked = @reservation.selected ? ''checked'' : nil %>
<td><%= check_box_tag("reservation[" + @reservation.id.to_s +
"][selected]", ''checked'', :checked => checked) %></td>
2011 Oct 21
20
How to transform my html form into a rails 3 form
Hi,
I have the following code working in a rails 3 view, but it is
unfortunately not pure rails code!
<% @filter1 = "tr.show1,tr.show2" %>
<% @filter2 = "tr.show1" %>
<% @filter3 = "tr.show2" %>
<form>
<p>
<input type="checkbox" value=<%=@filter1%> onclick="$
(this).is('':checked'')
2006 Jul 19
3
How do I check the retuned value from check_box_tag?
Hi,
I have this in my form
<%= check_box_tag(@accept, value = "1", checked = false) %>
Which puts a nice checkbox on my form but when I try to retrieve the
value that is returned, which I expect to find in @accept, there is
nothing. How do I check the returned value?
Thanks,
Paul Thompson
2006 Feb 28
6
Problem with select and each_with_index
Disclaimer: Ruby newbie at work
Thought I was going so well. Wanted to produce a select box from an
array constant, with the indices returned as values , and the array
values used as the descriptions. Checked out Ruby RDoc and saw there was
an each_with_index method and came up with:
<%= select (''type'', ''typecategory'', Typecategory.each_with_index
2007 May 25
3
check box value in array
Hi guys,
I have a group of check box in rails page.
check box Code as below:
<% for count in @total_cellno %>
<input name="checkbox" type="checkbox" value="<%= count %>" />
<% end %>
I want to receive the selected value in my controller model.
@selected_box << params["checkbox"]
I guess that it provides values
2006 May 10
2
Ordering of subsets in a model.
Alright, I got this table with lots of entries for menus. There''s
several menus (with their own model since each menu got some special
information). Now, I want to be able to specify the order of the menu
entries inside the menu. acts_as_list seems to not quite do the trick
since it does ordering "globally" on the whole model and
acts_as_nested_set seems like overkill since
2006 Apr 25
3
Simple Rails Question
Hi, I have a few simple rails questions:
Does the check_box_tag map to an int or to a boolean field within the
database?
Thanks in advance,
-Conrad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060425/4956dc68/attachment.html
2008 May 29
5
f.checkbox?
Okay so I have a typical search page where a keyword is entered and
results are retrieved that match the keyword. What I want to do now is
have checkboxes to search for results in specific areas (my site is a
big events calendar with "streams" and "audiences") I want to use the
checkboxes to look for results in ''streams'', ''audiences'', or
2008 Jan 31
3
Handling multiple Check boxes in a XHTML Strict way
Hi,
The default way we handle an array of checkboxes is like this:
<% items.each do |item| %>
<%= check_box_tag ''item[]'', "#{item.id}" %>
<% end -%>
this returns an array item[] that holds the ids of all the items.
Now the real issue:
1. The above loop will same ids to ''n'' items
2. All ids will be ''item[]''
2006 Jul 19
6
Howto: Check_box with a variable (no model)
Hi,
I would like to put a checkbox on a form where the input field is a
variable rather than a field in a model.
The normal way (with a model) would be:
<%= check_box(''client'', ''accept'', {}, "1", "0") %>
But since accept is a variable @accept and model client will not be
there, how do I make a check box work?
Regards,
Paul
2006 Jan 21
5
How do you deal with non-model property form values
I have a User ActiveRecord model that has email and password properties. I
want to build a login for that has a "remember me" option. My view looks
like this:
<% @page_title = "Login" -%>
<%= error_messages_for ''user'' %>
<%= form_tag %>
<table>
<tr>
<td align="right" width="1%"
2006 Aug 07
2
Getting an array of ids from form checkboxes?
Is it possible to set up a list of checkboxes so that the form
parameters are given in an array (eg {"delete_list" => [3,6,7]}) ?
At the moment I''m using
<%= check_box_tag "delete_list[#{post.id}]" %>
...which gives parameters looking like {"delete_list" => {"3" => "1",
"6" => "1",
2006 Mar 24
2
check_box_tag
hi,
What''s the right way to use the CHECK_BOX_TAG?
I used:
<% for @pippo in @model %>
<%= check_box_tag (:scelta,@pippo) %>
<% end %>
How Can I control if a person choosen the second or third element of the
vector @pippo?
--
Posted via http://www.ruby-forum.com/.
2009 Jul 16
9
Please help me understand how arrays are translated in rails
I''ve spent hours researching the subject and have tried many test
sequences in IRB, and rails console but I''m just having trouble making
headway into what is probably a very easy subject.
I understand arrays with at least 4 other languages but with Ruby I
haven''t found a mental connection with how I can assign variables to
arrays..
Take for example:
def
2006 Apr 03
2
Fast way of finding new position for model object?
I have a model object that acts as a list. The position of each object
is determined by two factors: number of votes ascending and age of
object descending. When a user adds or deletes a vote I need to
quickly update the associated model object''s position. Right now this
is done with the following method:
def update_position
position = nil
Bug.find(:all, :order =>