I am trying to get info from a from into a mysql query to check to see
if the value entered already exists in the database. I can''t seem to
get the params into the database without it spitting an error.
Here is my Controller:
def save_positive
@positive = Positive.new(params[:positive])
@positive.strip_all
@positive.downcase_all
@search = @positive.find_param
end
Here is my model
def find_param
uni = Positive.find(:all, :conditions => "im_client = :im_client and
screen_name = :screen_name or dating_site = :dating_site and alias :alias,
params")
end
Sorry if this is a silly question, I am pretty new to rails
Chris
--
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
-~----------~----~----~----~------~----~------~--~---