Displaying 1 result from an estimated 1 matches for "compare_fields".
2006 Apr 18
2
make rails 1.1 code 1.0-compliant
Hello,
I''m working on a rails 1.1 app on my mac, but my web host hasn''t
upgraded from 1.0 to 1.1 yet, so the below code, which works on my
machine, doesn''t work on the web server:
# controller
def compare_fields
name = params[:person][:name]
@exists = Album.count(["name like :n", {:n => name}])
render :update do |page|
if @exists > 0
page.replace_html ''messages'', "#{params[:person][:name]} exists
in the database."
end
end
end
In pa...