I have a single table in my database and in me controller
(principalcontroller.rb)
i need to put a method to find regs in the table.
def prebusca # here i put the form in the view
@persona = Persona.new(params[:persona])
if request.post?
redirect_to :action => :buscar
end
end
def buscar # here a try to show the recuest
@persona = Persona.find(:first, :conditions => "nombre
@persona.nombre")
end
thaks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---