class MainController < ApplicationController
  def index
  	@components = Component.all.is_approved.by_age.reverse
    @prompt = Prompt.last

  end
end

class MainController < ApplicationController
  def index
  	@components = Component.all.is_approved.by_age.reverse
    @prompt = Prompt.last || Prompt.create(content: "What is a fun date idea?")

  end
end

Add a default Prompt in order to not break the database if there aren't any prompts
Add a default Prompt in order to not break the database if there aren't any prompts
