lib/seek/permissions/policy_based_authorization.rb
def last_asset_id_for_user user_id
          unless user_id.is_a?(Numeric)
            user_id = user_id.nil? ? 0 : user_id.id
          end
          v = ActiveRecord::Base.connection.select_one("select max(asset_id) from #{lookup_table_name} where user_id = #{user_id}").values[0]
          v.nil? ? -1 : v.to_i
        end
#the highest asset id recorded in authorization lookup table for a given user_id or user. Used to determine if the table is complete
the highest asset id recorded in authorization lookup table for a given user_id or user. Used to determine if the table is complete
the highest asset id recorded in authorization lookup table for a given user_id or user . Used to determine if the table is complete
def last_asset_id_for_user user_id
          unless user_id.is_a?(Numeric)
            user_id = user_id.nil? ? 0 : user_id.id
          end
          v = ActiveRecord::Base.connection.select_one("select max(asset_id) from #{lookup_table_name} where user_id = #{user_id}").values[0]
          v.nil? ? -1 : v.to_i
        end
def last_asset_id_for_user user_id unless user_id . is_a? ( Numeric ) user_id = user_id . nil? ? 0 : user_id . id end v = ActiveRecord :: Base . connection . select_one ( "select max(asset_id) from #{lookup_table_name} where user_id = #{user_id}" ) . values [ 0 ] v . nil? ? - 1 : v . to_i end
the highest asset id recorded in authorization lookup table for a given user_id or user.
the highest asset id recorded in authorization lookup table for a given user_id or user .
user_id