I can get this to work in the console by subbing a string for
params[:person][:login_name] but my application won’t “catch” and
convert the params in the development site. Here is the login function:
#find user record by unique name
name_array = %w{params[:person][:login_name]}
name_array.each {|name| name.gsub!(/\"/, "")}
@person = Person.find(:first,
:conditions => ["first_name = ? and
last_name = ?", name_array[0], name_array[1]])
People log in with their full name like, “Bob S…” The database
contains first_name and last_name columns. In the console when I
substitute “Bob S.” for params[:person][:login_name] the record is
retrieved normally. But it doesn’t work with params. Any suggestions?
This variation doesn’t work either:
#find user record by unique email
name = params[:person][:login_name]
name_array = []
name_array = %w{name}
name_array.each {|name| name.gsub!(/\"/, "")}
@person = Person.find(:first,
:conditions => ["first_name = ? and
last_name = ?", name_array[0], name_array[1]])