I vaguely wonder if we should have a general pattern for attribute injection here (and in show.html.erb), but this seems to work well enough for now.