Re: checkboxes validation

George George
Thu, 17 May 2007 05:46:55 -0000

Keynan Pratt wrote:
> i meant
>
>       def selected
>           conditions = [[]]
>           params[:result].each do |result_id|
>               conditions.first <<
''feature.uniquename=?''
>               conditions << result_id
>           end if params[:result]
>
>
>            conditions[0] = conditions.first.join('' OR '')
>            conditions=[''1=1''] if !conditions.first or
conditions.first
> == ''''
>
>            @items= Feature.find(:all, :conditions => conditions)
>        end


Thanks Keynan!
How would i pass a message to the user informing him to make a
selection?
This is because with no selection the method seems make the browser
hang, till i manually stop the execution.