quoting: Check if id is a valid method before using it

Need to check if valud also respond_to :id before calling it, otherwise
things could explode.
Merge pull request #13412 from arthurnn/quote_id_not_id

quoting: Check if id is a valid method before using it
allow array or hash syntax for partial index conditions