Disabling a select

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