- when record.is_a?(User): user = record
- when record.is_a?(DiaryEntry): user = record.user
- when record.is_a?(DiaryComment): user = record.user
+ when record.is_a?(User) then user = record
+ when record.is_a?(DiaryEntry) then user = record.user
+ when record.is_a?(DiaryComment) then user = record.user