Check_box_tag

Hi,

i want select some attribute of a Model to work.
The model has this attributes
(tipo,pun,sm3,quantity,corrispettivo,importo) So i used:

<% for @variable in Model.column_names() %>
<%= check_box_tag (:key,@variable) %>
<%end%>

but if i use in the controller,this code:

@stats=Model.column_names()
for @cerca in @stats
if (@params[:scelta]==‘tipo’ or @params[:scelta]==‘quantity’)
@risultato=“ok”
end
end

the variable @risultato will be ‘ok’ only if i selected the attribute
‘tipo’.
While if i selected the attribute quantity, @risultato will be ‘ok’ only
if quantity has been select alone.

What’s the problem?

Ivan.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs