zanoni
September 19, 2006, 1:44pm
1
One thing I haven’t figured out or found an answer to is if I create a
select tag from a database table, how can I have an option for “Please
select” or “choose” or whatever -
I know i can do something like :include_blank => true. That works
fine. I came across an option like :include_blank_text => ‘something’,
but that didn’t work.
Anyone know how to do it ?
Stuart
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...
zanoni
September 19, 2006, 4:15pm
2
On 9/19/06, Dark A. [email protected] wrote:
One thing I haven’t figured out or found an answer to is if I create a
select tag from a database table, how can I have an option for “Please
select” or “choose” or whatever -
I know i can do something like :include_blank => true. That works
fine. I came across an option like :include_blank_text => ‘something’,
but that didn’t work.
Anyone know how to do it ?
Add that option manually.
@options = [[‘Select from list’, ‘’]] + Product.find(:all,
…).map{|p| p.name, p.id}
options_for_select(@options , …)
–
Rule Of Robustness: Robustness is the child of transparency and
simplicity.
zanoni
September 19, 2006, 5:36pm
3
I can’t seem to make this work -
This is what I have currently -
State
<% @states = State.find(:all, :order => “name”).map {|s| [s.name, s.id]}
%>
<%= f.select(“state” , @states , “include_text” => ‘please’ ) %>
Adding in the options seems to throw some parsing errors.
Stuart
On 9/19/06, Michael C. [email protected] wrote:
Anyone know how to do it ?
simplicity.
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...
zanoni
September 19, 2006, 5:58pm
4
<% @states = [[‘Please’, ‘’ ]] + State.find(:all, :order => “name”).map
{|s| [s.name, s.id]} %>
<%= f.select(“state” , @states ) %>
zanoni
September 19, 2006, 5:56pm
5
Okay, working now as;
State
<% @states = State.find(:all, :order => “name”).map {|s| [s.name,
s.id]} %>
<%= f.select(“state” , [[‘Please Select’, ‘’]] + @states ) %>
Does anyone know what the ‘prompt’ option is in a select ? I came
across mention of this in this patch message -
http://dev.rubyonrails.org/ticket/3858
Haven’t found anything on it though.
Stuart
On 9/19/06, Dark A. [email protected] wrote:
but that didn’t work.
–
Rule Of Robustness: Robustness is the child of transparency and
simplicity.
–
Dark ambient - Wikipedia
–
Dark ambient (referred to as ambient industrial especially in the 1980s) is a genre of post-industrial music that features an ominous, dark droning and often gloomy, monumental or catacombal atmosphere, partially with discordant overtones. It shows similarities with ambient music, a genre that has been cited as a main influence by many dark ambient artists, both conceptually and compositionally. Although mostly electronically generated, dark ambient also includes the sampling of hand-pla
The te...