Forum: Ruby on Rails check_box_tag

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ivan M. (Guest)
on 2006-03-27 13:44

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) %>

but if i use in the controller,this code:

for @cerca in @stats
if (@params[:scelta]=='tipo' or @params[:scelta]=='quantity')

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

What's the problem?

This topic is locked and can not be replied to.