a) This

  if post.published?
    'published'
  else
    'draft'
  end

can be written like this

  post.published? 'published' : 'draft'

b) This

if post.published?
  'published'
elsif post.draft?
  'draft'
else
  'archived'
end

can be written like this

  post.published? ? 'published' : post.draft? 'draft' : 'archived'