My doubt is i am throwing an sql statement
@authenticates = Authenticate.find(
:all,
:conditions => ["userid = ? AND password = ?", params[:text1], params[:text2]]
)
I need to put an if condition, so that if the above data exists i need to redirect to other page else display an error
How can i do this