Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 983

Show
Ignore:
Timestamp:
03/23/05 00:57:38 (4 years ago)
Author:
david
Message:

Fixed that AR exists?() would explode on postgresql if the passed id did not match the PK type #900 [Scott Barron]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/CHANGELOG

    r982 r983  
    11*SVN* 
     2 
     3* Fixed that AR exists?() would explode on postgresql if the passed id did not match the PK type #900 [Scott Barron] 
    24 
    35* Fixed the MS SQL adapter to work with the new limit/offset approach and with binary data (still suffering from 7KB limit, though) #901 [delynnb] 
  • trunk/activerecord/lib/active_record/base.rb

    r944 r983  
    331331      #   Person.exists?(5) 
    332332      def exists?(id) 
    333         !find_first("#{primary_key} = #{sanitize(id)}").nil? 
     333        !find_first("#{primary_key} = #{sanitize(id)}").nil? rescue false 
    334334      end 
    335335