class AuthorDecorator < ApplicationDecorator
  delegate_all
  
  def email
    source.try :email || "No Email"
  end

  def name
    source.try :name || "Anonymous"
  end

  def image
    source.avatar.thumb.url or
    source.try :image or
    "https://secure.gravatar.com/avatar/1c02274fedcce55a289172bfb8db25ab.jpg"
  end

  def image_link
    link_to image_tag(image, class: 'navatar'), author_path(source)
  end

  def email_tag
    mail_to email, email
  end

  def link_tag
    link_to name, author_path(source)
  end

  def status
    if source.active then "active" else "inactive" end
  end
end

class AuthorDecorator < ApplicationDecorator
  delegate_all
  
  def email
    source.try :email || "No Email"
  end

  def name
    source.try :name || "Anonymous"
  end

  def image
    source.avatar.thumb.url or
    source.try :image
  end

  def image_link
    link_to image_tag(image, class: 'navatar'), author_path(source)
  end

  def email_tag
    mail_to email, email
  end

  def link_tag
    link_to name, author_path(source)
  end

  def status
    if source.active then "active" else "inactive" end
  end
end

Remove Code School avatar fallback.
Remove Code School avatar fallback.

It made it harder to see who didn't have a photo.
