Forum: Ruby problem with parameters

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jose vicente R. (Guest)
on 2008-12-12 15:47
First at all sorry if my english is not the best.

In the view I have this code:

<%= select_tag "tabla", options_for_select(["Famitel", "Polycom Kirk",
"LG Nortel", "Dimax Videovigilancia"]) %>
<%= text_field :buscar, params[:codigo_aleatorio]%>
<%= button_to "Buscar" , :action => :elijovista %>

In elijovista´s controller I need to know the item that was selected in
tabla and the text.

my code is:
def elijovista
   debugger
   return params[:payment]


    case :tabla
        when "Famitel"
         @ticket=Ticket.find( :first, :select =>"reference",
:conditions=>['codigo_aleatorio=?',params[:codigo_aleatorio]])

        # renders app/views/zonaclientes/showFamitel
        render :template => 'zonaclientes/showFamitel'
      return
.
.
.
.
(The same for the rest of the items)
.
.
But render never works, always show the elijovista view.

Whats wrong? How can obtain the option selected in tabla?

Thanks for all
Chris L. (Guest)
on 2008-12-12 16:17
> Whats wrong? How can obtain the option selected in tabla?

You might get better answers in a Rails-specific forum :

http://groups.google.com/group/rubyonrails-talk
http://railsforum.com/

Good luck,


Chris
Jose vicente R. (Guest)
on 2008-12-12 16:43
thanks
This topic is locked and can not be replied to.