移譲先がnilのdelegate

What is an Information Architecture?

class User < ActiveRecord::Base
  belongs_to :profile
  delegate :job, to: :profile, allow_nil: true
end

time_ago_in_words

Railsで「~ 分前」とかそういうやつ。

ActionView::Helpers::DateHelper | RailsDoc(β)