add method 'extract' to hash


    def confirm
      user = User.where(params.extract(:id, :confirmation_token)).first!

i can't use method slice, since i get empty hash if params has no key 'confirmation_token'.

i think it is usefull method for a lot of situations.