I have a huge method in my controller that is not DRY and just could use some general TLC. I'm new to ruby and I have not refactored my own code before, only contrived code you find on tutorials. Below I will show my controller, just to be clear I'm not looking for a full answer just maybe where I should start and some helpful tips. def process_message(message, subscriber)  if message == tulip || message == stem    # If the user has subscribed flip the bit    # and let them know    subscribed = message == tulip    subscriber.update(subscribed: subscribed)    # Respond appropriately    output = You are now subscribed for updates.    unless subscriber.subscribed      output = You have unsubscribed from notifications. Test 'TULIP' to start receieving updates again    end    subscriber.add_to_group(visitor)  elsif message == dancers    subscribed = message == dancers    subscriber.update(subscribed: subscribed)    subscriber.add_to_group(dancers)    output = You have been subscribed to the Dancers list  elsif message == staff    subscribed = message == staff    subscriber.update(subscribed: subscribed)    subscriber.add_to_group(staff)    output = You have been subscribed to the Staff list  elsif message == volunteer    subscribed = message == volunteer    subscriber.update(subscribed: subscribed)    subscriber.add_to_group(volunteer)    output = You have been subscribed to the Volunteer list  else    # If we don't recognize the command, text back with the list of    # available commands    output = Sorry, we don't recognize that command. Available commands are: 'TULIP' or 'STEM'.  end  output
Controller method to manage SMS subscriptions
ruby on rails;ruby;controller