Rails CRUD Problem

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

What error do you get ? We’re not psychic :slight_smile:
What is Positive ? An ActiveRecord object, or something of your own
construction (if so, what does its source look like ?)

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs