Supportive

Made changes suggested by reviewer and resubmitting for review.
Got it!

On Tue, Oct 28, 2014 at 10:57 AM, Blake Thomas <notifications@github.com>
wrote:

> In supportive/supportive.rb:
>
> >    end
> >
> > -  def as_title(string)
> > -    string = String(string)
> > -    words = string.gsub('_', ' ').split(' ')
> > +  def set_publish_date
> > +    @publish_date = (@document[:publish_date].try { |date| Date.parse(date) }) || Date.today
>
> This is fine, except that if Date.parse fails because it doesn't like the
> format you're still going to get a parse error, which I suspect may have
> been what you were trying to do. Try this instead:
>
> @publish_date = Date.parse(@document[:publish_date]) rescue Date.today
>
> I don't always recommend using an inline rescue like that, but I think
> that in this case it fits.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/jmmastey/level_up_exercises/pull/166/files#r19480739>.
>