When using a while loop confirm there is a break from the loop as you run methods. An infinite loop will occur otherwise. def room_service(menu) while choice != ‘breakfast’ case menu when ‘lunch’ break puts "1100-1400" when ‘dinner’ break puts "1600-2000" when ‘late-night’ break puts "2100-200" end end end :)

Often we might need to sub many characters from a string. This can be accomplished by using the following with gsub. result = ‘{"users"[1,2,3,4,5,6]}’   replacements = [ ["{", ""], ["}", ""], ["\"users\":", ""] ] replacements.each {|replacement| result.gsub!(replacement[0], replacement[1])} arr = result.split(’,’).map {|s| s.to_i }   puts arr #=> [1,2,3,4,5,6] :)

“If/Unless” statements in ruby are always evaluated to false if nil, so it is possible to assign variables in a if/unless statement. unless @user = User.find_by(id: user_params.id) render :json error: "Can’t find user with #{user_params.id}" end This is a cool part of the syntax, and the Ruby style guide recommends those assignment be wrapped in parentheses. unless (@user = User.find_by(id: user_params.id)) render :json error: "Can’t find user with #{user_params.id}" end I think the first syntax is cleaner, but I can see why reading the second example is more expressive as to what is happening. I try not to pontificate, so the decision is yours now that you know. :)