Been playing around with a few things here but can’t seem to disable
this select :
Wages
<%= @wages = Wage.find(:all, :order => "id").map { |w| [w.name, w.id] }
select(:wage, :name, @wages, {:disabled = true})%>
Anyone know ?
TIA
Stuart
Been playing around with a few things here but can’t seem to disable
this select :
Wages
<%= @wages = Wage.find(:all, :order => "id").map { |w| [w.name, w.id] }
select(:wage, :name, @wages, {:disabled = true})%>
Anyone know ?
TIA
Stuart
Dark A. wrote:
Been playing around with a few things here but can’t seem to disable
this select :Wages
<%= @wages = Wage.find(:all, :order => "id").map { |w| [w.name, w.id] } select(:wage, :name, @wages, {:disabled = true})%>
You want:
select(:wage, :name, @wages, {}, {:disabled = true})
so select is html_options ( 5th param ) not options ( 4th param )
select(object, method, choices, options = {}, html_options = {})
there is a > missing
select(:wage, :name, @wages, {}, {:disabled => true})
–
Heri R.
http://sprinj.com
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs