def id
      params_id_key_candidates.each do |key|
        value = params[key]
        return value if value.present?
      end

      nil
    end
def id
      params_id_key_candidates.each do |key|
        value = params[key]
        return value if value.present?
      end

      nil
    end
Public: Checks a params hash for an id attribute.

 Checks a hash of parameters for keys that represent an object's id.

 Returns the value of the id parameter, if it exists. Otherwise nil.