Fixed warning by rubocop for event model